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

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

Q.122Easy

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

Q.123Medium

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

Q.124Medium

Which function is used to allocate memory dynamically at runtime?

Q.125Medium

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

Q.126Medium

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

Q.127Medium

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

Q.128Medium

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

Q.129Hard

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

Q.130Hard

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

Q.131Easy

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

Q.132Easy

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

Q.133Easy

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

Q.134Medium

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

Q.135Easy

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

Q.136Medium

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

Q.137Easy

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

Q.138Medium

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

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

Q.140Medium

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