iGET

C Programming - MCQ Practice Questions

Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

978 questions | 100% Free

Q.1Easy

Which of the following is the correct syntax to declare a variable in C?

Q.2Easy

What does the following code snippet output? #include <stdio.h> int main() { int x = 5; printf("%d", x++); return 0; }

Q.3Easy

What is the output of: printf("%d", 5 + 3 * 2)?

Q.4Easy

What is the purpose of the main() function in C?

Q.5Easy

Which escape sequence represents a tab character in C?

Q.6Easy

Which keyword is used to create a variable that cannot be modified after initialization?

Q.7Easy

What is the output of the following code? #include <stdio.h> int main() { int arr[] = {10, 20, 30}; printf("%d", *(arr + 1)); return 0; }

Q.8Easy

In C, which of the following statements about pointers is TRUE?

Q.9Easy

What will be printed by the following code? #include <stdio.h> int main() { char str[] = "Hello"; printf("%c", str[1]); return 0; }

Q.10Easy

What is the output of the following code? #include <stdio.h> int main() { char c = 'A'; printf("%d", c); return 0; }

Q.11Easy

Which of the following is the correct syntax to declare a pointer to an integer in C?

Q.12Easy

What is the size of 'char' data type in C?

Q.13Easy

Which of the following variable names is valid in C?

Q.14Easy

What is the default return type of the main() function in C?

Q.15Easy

Which escape sequence is used to print a newline character in C?

Q.16Easy

What is the size of the 'int' data type in a 32-bit system according to C standard?

Q.17Easy

Which of the following is NOT a valid C identifier?

Q.18Easy

In C, what is the size of the 'char' data type?

Q.19Easy

What is the output of: char c = 65; printf("%c", c);

Q.20Easy

Which header file is required to use the malloc() function?

C Programming MCQs & Practice Tests – Free | iGET | iGET