iGET

Computer Knowledge - MCQ Practice Questions

Practice free Computer Knowledge multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

309 questions | 100% Free

Q.141Medium

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

Q.142Medium

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

Q.143Medium

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

Q.144Easy

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

Q.145Medium

What does the sizeof() operator return in C?

Q.146Hard

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

Q.147Hard

What will be the output: int a = 2, b = 3; printf("%d", a * b + a / b);

Q.148Easy

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

Q.149Medium

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

Q.150Medium

Which of the following statements about pointers is correct?

Q.151Medium

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

Q.152Easy

Which loop construct in C guarantees execution at least once?

Q.153Easy

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

Q.154Medium

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

Q.155Medium

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

Q.156Easy

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

Q.157Hard

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

Q.158Medium

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

Q.159Easy

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

Q.160Hard

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