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
What will be the result of: int a = 10, b = 3; int c = a % b; printf("%d", c);
What happens if you declare a variable but don't initialize it in C?
Consider: int *ptr = NULL; *ptr = 5; What will happen?
Which of the following is a correct way to declare a pointer to an integer in C?
What is the output of the following code: printf("%d", sizeof(int));
Which of the following correctly initializes a 2D array in C?
What will be the output of: char ch = 'A'; printf("%d", ch);
Which of the following is NOT a valid identifier in C?
What is the output of: int x = 5; int y = ++x + x++; printf("%d %d", x, y);
In C, what is the difference between single quotes and double quotes?
What is the output of: int a = 10, b = 20; a = a ^ b; b = a ^ b; a = a ^ b; printf("%d %d", a, b);
In C, which function is used to read a string from input with space handling?
What is the purpose of the 'static' keyword when used with a variable inside a function?
Which of the following correctly represents a structure declaration in C?
What does the 'volatile' keyword indicate in C?
Consider: int *ptr; int arr[] = {1,2,3}; ptr = arr; What is ptr[1]?
What will be the final value of x: int x = 5; x += 3 * 2; printf("%d", x);
Which of the following operators has the highest precedence in C?
Which of the following is true about the 'break' statement in C?
What will be printed: int i = 0; while(i < 3) { printf("%d ", i); i++; }