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

What is the purpose of the const keyword when used with a pointer?

Q.82Medium

What is the return type of malloc() function?

Q.83Medium

In the expression: int arr[10]; what is arr[5]?

Q.84Medium

What is the output of: int a = 10, b = 20; int *p = &a, *q = &b; printf("%d", *p + *q);?

Q.85Medium

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

Q.86Medium

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

Q.87Medium

Which of the following correctly defines a structure in C?

Q.88Medium

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

Q.89Medium

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

Q.90Medium

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

Q.91Medium

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

Q.92Medium

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

Q.93Medium

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

Q.94Medium

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

Q.95Medium

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?