C Function - C programming (MCQ) questions

Here, you can read C Function multiple choice questions and answers with explanation.

1)   Comment on the output of following C program?

#include <stdio.h>
main()
{
     int a = 1;
     printf("size of a is %d, ", sizeof(++a));
     printf("value of a is %d", a);
};

- Published on 26 Feb 17

a. size of a is 4, value of a is 1
b. size of a is 4, value of a is 2
c. size of a is 2, value of a is 2
d. None of the above
Answer  Explanation 

ANSWER: size of a is 4, value of a is 1

Explanation:
No explanation is available for this question!


2)   What will the function rewind() do?
- Published on 26 Feb 17

a. Reposition the file pointer to a character reverse.
b. Reposition the file pointer stream to end of file.
c. Reposition the file pointer to begining of that line.
d. Reposition the file pointer to begining of file.
Answer  Explanation 

ANSWER: Reposition the file pointer to begining of file.

Explanation:
No explanation is available for this question!


3)   In C, if you pass an array as an argument to a function, what actually gets passed?

- Published on 26 Feb 17

a. Value of elements in array
b. First element of the array
c. Base address of the array
d. Address of the last element of array
Answer  Explanation 

ANSWER: Base address of the array

Explanation:
No explanation is available for this question!


1