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.121Hard

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

Q.122Easy

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

Q.123Easy

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

Q.124Easy

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

Q.125Medium

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

Q.126Easy

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

Q.127Medium

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

Q.128Easy

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

Q.129Medium

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.130Medium

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

Q.131Medium

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

Q.132Medium

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

Q.133Hard

What does the 'volatile' keyword indicate in C?

Q.134Hard

Consider: int *ptr; int arr[] = {1,2,3}; ptr = arr; What is ptr[1]?

Q.135Medium

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

Q.136Easy

Which of the following is true about the 'break' statement in C?

Q.137Medium

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

Q.138Medium

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

Q.139Medium

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

Q.140Medium

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