MCQ of C
MCQ of C
MCQ of C
2. Which keyword is used to come out of a loop only for that iteration?
a) break b) continue c) return d) void
3. How many times i value is checked in the following C program?
#include <stdio.h>
int main()
{
int i = 0;
while (i < 3)
i++;
printf("In while loop\n");
}
a) 2
b) 3
c) 4
d) 1
#include <stdio.h>
int main()
int c = 2 ^ 3;
printf("%d\n", c);
}
a) 1
b) 8
c) 9
d) 0
a) break
b) return
c) exit
#include <stdio.h>
int main()
{
for (int k = 0; k < 10; k++);
return 0;
}
a) Yes
b) No
d) Error
9. What is the function of the mode ‘ w+’?
c) create text file for writing, do not discard previous contents if any
d) create text file for update, do not discard previous contents if any