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

Which loop construct will execute at least once even if the condition is false?

Q.182Medium

How is a two-dimensional array typically stored in memory in C?

Q.183Hard

What is the difference between #include <stdio.h> and #include "stdio.h"?

Q.184Hard

Consider the code: int *p; int arr[5]; p = arr; What does p[2] represent?

Q.185Hard

Which of the following will correctly allocate memory for an array of 10 integers?

Q.186Hard

What will be the output of: int x = 5; int y = x++ + ++x; ?

Q.187Easy

Which function is used to read a single character from standard input?

Q.188Easy

In the expression: int arr[3][3]; arr[1][2] = 5; What is being accessed?

Q.189Easy

What is the output of the following C code? int main() { int a = 10; printf("%d", a += 5); return 0; }

Q.190Medium

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

Q.191Easy

What is the purpose of the strlen() function in C?

Q.192Medium

What will be the output of the following code? int *ptr; int arr[3] = {10, 20, 30}; ptr = arr; printf("%d", *(ptr + 1));

Q.193Hard

Consider this complex code snippet: int a = 5, b = 2; int result = a * b + ++b * a--; printf("%d %d %d", result, a, b); What will be the output?

Q.194Hard

What is the output of this recursive function? int func(int n) { if(n <= 1) return 1; return n * func(n-1); } printf("%d", func(4));

Q.195Hard

What is the output of this code involving bitwise operations? int x = 5; // binary: 0101 int y = 3; // binary: 0011 printf("%d", x ^ y); // XOR operation

Q.196Easy

What will be the value of 'x' after execution of the following code? int x = 10; x += 5; x *= 2;

Q.197Medium

What is the primary difference between malloc() and calloc() functions in C?

Q.198Medium

If arr[5] = {1, 2, 3, 4, 5}, what will be the value of *(arr + 3)?

Q.199Easy

Which header file must be included to use the printf() function in C?

Q.200Medium

Consider a structure: struct Point { int x; int y; }; If p is a pointer to this structure and we want to access member x, which notation is INCORRECT?