C Quiz

0

C Quiz

An MCQ Quiz for C Interviewers

1 / 31

30) The number of elements stored in a Multi-dimensional array can be found by which operation?

2 / 31

29) Which of these is a header file for string functions?

3 / 31

28) What will be the output of the following code? #include
int main()
{
int arr[] = { 23, 96, 30, 32, 90, 20 };

int* ptr = arr;
printf("The number is %d", *ptr);
return 0;
}

4 / 31

27) Which of the following is the dereference operator?

5 / 31

26) What will be the output of the following code? int main() {
const int myNum = 48;
myNum == 32;

printf("%d", myNum);
return 0;
}

6 / 31

25) What will be the data type of myCopy = 'E';

7 / 31

24) Which of the following code will print 410 as output?

8 / 31

23) Which of the following code will print "Good Morning" in C?

9 / 31

22) To access the members of structure in C language, we must use?

10 / 31

22) What will be the output of the following program? #include
#include

int main() {
printf("%f", sqrt(256));
return 0;
}

11 / 31

21) Which of the following will return the tangent of an angle?

12 / 31

20) What is the output of the following program? #include
#include

int main() {
printf("%fn", ceil(3.8));
printf("%fn", floor(3.8));
return 0;
}

13 / 31

19) Which of the following leads to excessive loss of memory or processor power if the function is not writen properly

14 / 31

18) A function in C language consists of

15 / 31

17) Which of the following code will print "I am enough"?

16 / 31

16) What are specified after a function name inside a parenthesis?

17 / 31

15) Which of the following code will result from an output 13?

18 / 31

14) Which of the following are arguments in the code void myFunction(char name[]) {
printf("Good Morning %sn", name);
}

int main() {
myFunction("Julie");
myFunction("Mira");
myFunction("Sanjal");
return 0;
}

19 / 31

13) What is the output of the following code?

void myFunction() {
printf("I am going for shopping");
}
printf("I love shopping");
int main() {
myFunction();
return 0;
}

20 / 31

12) The memory address of a variable is stored in which format?

21 / 31

11) To get user input, we must use

22 / 31

10) What is the output of the code? int main() {
char regards[] = "Nice to meet you";
printf("%c", regards[5]);

return 0;
}

23 / 31

What will be the output of the following program #include

int main() {
int i;

for (i = 0; i <= 25; i = i + 5) { printf("%dn", i); } return 0; }

24 / 31

Which loop is used when we know exactly how many times we want to loop through a block of code?

25 / 31

Which of these operators returns true if both statements are true

26 / 31

Which Keyword is unchangeable and read-only in C?

27 / 31

What is the size of variables int, double, char respectively in C language?

28 / 31

Which of the following is the Char variable in C?

29 / 31

How many printf() functions can we add in the C language

30 / 31

What is #include in C language?

31 / 31

C language is associated with which operating system?

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.