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.141Easy

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

Q.142Medium

What does the sizeof() operator return in C?

Q.143Hard

What is the difference between getchar() and scanf("%c", &ch); in C?

Q.144Easy

What will be the memory size occupied by: int arr[5][3];?

Q.145Medium

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

Q.146Medium

Which of the following statements about pointers is correct?

Q.147Medium

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

Q.148Easy

Which loop construct in C guarantees execution at least once?

Q.149Easy

What is the scope of a variable declared inside a block?

Q.150Medium

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

Q.151Medium

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

Q.152Easy

What will be the value of x after executing: int x = 5; x += 3; x *= 2;

Q.153Hard

Which of the following correctly describes the relationship between arrays and pointers in C?

Q.154Medium

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

Q.155Easy

Which preprocessor directive is used to include a custom header file?

Q.156Hard

What is the difference between a function declaration and a function definition in C?

Q.157Hard

Which of the following is the correct way to declare a pointer to a function that returns an int and takes two int parameters?

Q.158Easy

Which of the following is NOT a valid variable name in C?

Q.159Easy

What will be the output of: printf("%d", 5 + 3 * 2);?

Q.160Easy

What keyword is used to create a pointer variable in C?