Extra 5% OFF Use Code: OL05
Free Shipping over ₹999

C Programming Quiz

C Programming Quiz

1 / 100

Which of the following is NOT a type of loop in C?

2 / 100

Can the conditional expression in an if statement be non-integer values?

3 / 100

Can an array size be changed after declaration in C?

4 / 100

Which statement is true about an enum?

5 / 100

What is the correct way to declare and initialize a structure variable?

6 / 100

What happens if the condition in a loop is always true?

7 / 100

Which of the following statements is true about structures?

8 / 100

What is the ASCII value of '0'?

9 / 100

What is the correct way to call a function?

10 / 100

What is the output of the following program?

11 / 100

What is the correct syntax to declare a pointer to an integer?

12 / 100

Which of the following is a logical operator in C?

13 / 100

How do you declare an enum variable in C?

14 / 100

What happens if break is used outside a loop or switch?

15 / 100

Can a structure contain a pointer to itself?

16 / 100

How do you declare a union variable in C?

17 / 100

What is an enumeration (enum) in C?

18 / 100

What will happen if malloc() fails to allocate memory?

19 / 100

Which of the following is a conditional statement in C?

20 / 100

Which of the following is NOT a jump statement in C?

21 / 100

What does continue do in a while loop?

22 / 100

What is a function prototype in C?

23 / 100

What is the index of the first element in an array?

24 / 100

How do you find the number of elements in an array in C?

25 / 100

What is the main difference between break and continue?

26 / 100

Which data type is used to store a single character in C?

27 / 100

What is a structure in C?

28 / 100

What is the purpose of the else if statement?

29 / 100

What will be the output of the following code?

30 / 100

What is a Union in C ?

 

31 / 100

What will be the default value of GREEN in the following code?

enum Color { RED, GREEN, BLUE };

32 / 100

What does the break statement do?

33 / 100

Which loop is used when the number of iterations is known?

34 / 100

What is the output of the following code?

35 / 100

What is the keyword used to define a structure in C?

36 / 100

How do you define a union in C?

37 / 100

What is the purpose of the break statement?

38 / 100

What will be the output of this program?

39 / 100

How do you dynamically allocate memory in C?

40 / 100

What is the output of the following code?

41 / 100

Which operator is used for bitwise XOR?

42 / 100

How do you define a structure in C?

43 / 100

Which of the following correctly initializes an array?

44 / 100

What is the size of an enum in C?

45 / 100

What will be the output of the following code?

46 / 100

What is the difference between void and int functions?

47 / 100

How are multi-dimensional arrays stored in memory?

48 / 100

How do you pass an argument by reference in C?

49 / 100

In which of the following can break be used

50 / 100

What is a structure in C?

51 / 100

Which of the following is the correct syntax for an if statement in C?

52 / 100

Which of the following is a correct way to free allocated memory?

53 / 100

How do you access structure members in C?

54 / 100

What will happen if you try to dereference a NULL pointer?

55 / 100

What happens if recursion doesn't have a base case?

56 / 100

What is a function prototype in C?

57 / 100

What is the difference between while and do-while loops?

58 / 100

What is the correct syntax for a for loop?

59 / 100

 Which of the following is NOT a valid format specifier in C?

60 / 100

What is the format specifier for printing an integer in C?

61 / 100

How do you define a structure in C?

62 / 100

What is a pointer in C?

63 / 100

Which operator is used to get the address of a variable?

64 / 100

Which statement is not a jump statement?

65 / 100

What is the purpose of typedef with unions?

66 / 100

What is the output of this program?

67 / 100

Which of the following is required to prevent infinite recursion?

68 / 100

What is the purpose of the return 0; statement in the main() function?

69 / 100

What will be the output of the following program?

70 / 100

How do you define an enumeration in C?

71 / 100

Which of the following statements about recursion is false?

72 / 100

What is the correct syntax to declare a variable in C?

73 / 100

What happens if two enumeration constants have the same value?

74 / 100

How do you terminate a loop immediately in C?

75 / 100

What is the main difference between a struct and a union?

76 / 100

What is the output of this program?

77 / 100

What is the main advantage of recursion?

78 / 100

How do you access a structure member?

79 / 100

What is Recursion in C ?

 

80 / 100

What is an array in C?

81 / 100

What is the size of an int variable in C (typically on a 32-bit system)?

82 / 100

Which of the following is a correct function prototype?

83 / 100

Where can continue be used?

84 / 100

What is the purpose of typedef in structures?

85 / 100

How do you access structure members using a pointer?

86 / 100

What is a function in C?

87 / 100

What is the purpose of a function prototype?

88 / 100

Which operator is used to access union members?

89 / 100

What will be the output of this code?

90 / 100

What is the best practice regarding goto in C?

91 / 100

What is the correct syntax to declare a function in C?

92 / 100

Which statement is used to exit a switch case?

93 / 100

Which of the following is the assignment operator in C?

94 / 100

Which of the following is used to read input from the user in C?

95 / 100

How do you declare a pointer to a structure?

96 / 100

Which statement is true about return?

97 / 100

What is a dangling pointer?

98 / 100

How do you declare an integer array of size 5 in C?

99 / 100

What happens if you access an array index that is out of bounds?

100 / 100

What will happen if a function is used without a prototype in C?

Your score is

The average score is 66%

0%

    Leave a Reply

    Your email address will not be published.

    Need Help?