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

Which of the following is used to dynamically allocate memory in C?

Q.62Medium

What will be the output of: char str[] = "Hello"; printf("%c", str[1]);?

Q.63Medium

Which function is used to compare two strings in C?

Q.64Medium

What is the output of the following: int x = 5; int *p = &x; printf("%d", *p);?

Q.65Hard

Which of the following is an invalid identifier in C?

Q.66Hard

What will be the output of: int x = 5; printf("%d %d", x++, ++x);?

Q.67Hard

What is the difference between structure and union in C?

Q.68Hard

Which of the following function declarations is correct for a function that takes no parameters and returns no value?

Q.69Hard

In C, what is the purpose of the typedef keyword?

Q.70Easy

In C programming, which of the following is NOT a valid data type?

Q.71Easy

What will be the output of: int a = 10; int b = 20; int c = a + b; printf("%d", c);?

Q.72Easy

Which of the following is used to declare a constant in C?

Q.73Easy

What is the purpose of the return statement in a C function?

Q.74Medium

What will be the output of: int x = 5; x += 3; printf("%d", x);?

Q.75Medium

Which loop in C does NOT check the condition before executing the loop body?

Q.76Medium

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

Q.77Medium

Which function is used to allocate memory dynamically in C?

Q.78Medium

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

Q.79Medium

In C, what does the scanf() function do?

Q.80Medium

What will be the output of: for(int i = 0; i < 3; i++) { printf("%d ", i); }?