Question
1.A pointer may be initialized with A. the value of an existing variable of the same type B. the address of an existing variable of
1.A pointer may be initialized with
A. the value of an existing variable of the same type B. the address of an existing variable of the appropriate type. C. The value of a floating- point variable D. None of above
2.Assuming that arr is an array identifier, the statement sum +=*arr;
A. is illegal in C B. will always result in a complier error. C. Adds the value stored in arr (0) to sum. D. Adds the address of the pointer arr to sum. E. None of the above
3.The statement int *ptr; means A. the variable called ptr will store an integer value B. the variable called *ptr will store an asterisk and an integer value C. ptr is a pointer variable that will store the address of an integer variable D. all of above E. none of the above
4.if array name arrayName is passed to a function, C automatically passes_____
A. &arrayName [1] B. arrayName[1] C. &arrayName[0] D. *arrayName
5.which of the following does not initialize all of the array elements to 0?
A. Int b[2]; b[0]=b[1]=0; B. int b[2]={0}; C. int b[2]; for (int i=0; i<1; ++i){b[i]=0;} D. all of the above initialize all of their elements to 0.
6.If there are fewer initializers than elements in the array, the remaining elements are____
A. deleted B. ignored C. initialized to zero D. initialized to empty
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started