iGET

Computer Knowledge - MCQ Practice Questions

Computer Science questions in competitive exams stay close to fundamentals, which is good news if you revise the right five subjects. Coverage includes data structures, algorithms and complexity, operating systems, database management systems, computer networks, and computer organisation. Explanations show the trace or the state table where one helps, since seeing the intermediate steps is what makes the concept stick.

304 questions | 100% Free

Q.61Medium

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

Q.62Medium

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

Q.63Medium

In C, which function is used to read a string from input with space handling?

Q.64Medium

What is the purpose of the 'static' keyword when used with a variable inside a function?

Q.65Medium

Which of the following correctly represents a structure declaration in C?

Q.66Medium

Which of the following operators has the highest precedence in C?

Q.67Medium

What will be printed: int i = 0; while(i < 3) { printf("%d ", i); i++; }

Q.68Medium

What is the correct syntax to free dynamically allocated memory in C?

Q.69Medium

What does the following code do: int *ptr = NULL;

Q.70Medium

What is the output of: printf("%f", );

Q.71Medium

What does the sizeof() operator return in C?

Q.72Medium

What does the modulus operator (%) return when applied to negative numbers?

Q.73Medium

Which of the following statements about pointers is correct?

Q.74Medium

What is the correct way to declare a constant in C?

Q.75Medium

How many times will the following loop execute: for(int i=0; i<5; i++) { if(i==3) break; }

Q.76Medium

Which of the following is a correct way to initialize a pointer to NULL?

Q.77Medium

What is the output of the expression: * 3 in C?

Q.78Medium

What is the correct syntax to pass a 2D array to a function in C?

Q.79Medium

What will be printed by: int x = 5; printf("%d", ++x + x++);?

Q.80Medium

Which of the following correctly uses the ternary operator?