iGET

Computer Knowledge - MCQ Practice Questions

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

309 questions | 100% Free

Q.121Easy

What will be the output of: int a = 5, b = 5; if(a == b) printf("Equal"); else printf("Not Equal");

Q.122Medium

What will be the output of: char c = 'A'; printf("%d", c);

Q.123Hard

Consider a complex expression: int x = 2 + 3 * 4 - ; What is x?

Q.124Easy

Which header file is essential for using the printf() function in C?

Q.125Medium

What is the output of: int arr[5]; printf("%d", sizeof(arr));

Q.126Medium

Which function is used to allocate memory dynamically at runtime?

Q.127Medium

What is the purpose of the break statement in a switch case?

Q.128Medium

What will be the output of: int x = 5, y = 10; if (x < y) printf("yes"); else printf("no");

Q.129Medium

Which of the following is NOT a valid way to pass arguments to a function in C?

Q.130Medium

What will be the result of: int a = 10, b = 3; int c = a % b; printf("%d", c);

Q.131Hard

What happens if you declare a variable but don't initialize it in C?

Q.132Hard

Consider: int *ptr = NULL; *ptr = 5; What will happen?

Q.133Easy

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

Q.134Easy

What is the output of the following code: printf("%d", sizeof(int));

Q.135Easy

Which of the following correctly initializes a 2D array in C?

Q.136Medium

What will be the output of: char ch = 'A'; printf("%d", ch);

Q.137Easy

Which of the following is NOT a valid identifier in C?

Q.138Medium

What is the output of: int x = 5; int y = ++x + x++; printf("%d %d", x, y);

Q.139Easy

In C, what is the difference between single quotes and double quotes?

Q.140Medium

What is the output of: int a = 10, b = 20; a = a ^ b; b = a ^ b; a = a ^ b; printf("%d %d", a, b);