0% found this document useful (0 votes)
12 views1 page

Array

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Array

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Define an array and explain its key characteristics.

2. Differentiate between a one-dimensional and a multi-dimensional array with examples.

3. Write a program to declare an array of size 10 and initialize it with the numbers 1 to 10.

4. Given the array int arr[] = {5, 10, 15, 20, 25};, what will arr[2] return?

5. Write a program to input 5 elements into an array and display them.

6. Write a program to traverse an array and print all its elements.

7. Take 10 integer inputs from user and store them in an array. Again ask user to give a

number. Now, tell user whether that number is present in array or not write a C++

program.

You might also like