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

Which of the following is the correct way to define a function that takes no parameters and returns no value?

Q.82Medium

What is the output of the following program: int x = 5; if(x > 3) printf("Greater"); else printf("Smaller");?

Q.83Hard

In C, when passing arrays to functions, what is actually passed?

Q.84Hard

What will be the output of: int a = 5; int *p = &a; printf("%d %d", a, *p);?

Q.85Easy

Which header file is required for using the printf() function?

Q.86Easy

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

Q.87Easy

Which operator is used to access the value at an address in C?

Q.88Easy

What does the sizeof() operator return?

Q.89Easy

Which of the following is a correct way to initialize a 1D array in C?

Q.90Medium

What is the return type of the malloc() function?

Q.91Medium

Which function is used to release dynamically allocated memory in C?

Q.92Medium

What is the difference between calloc() and malloc()?

Q.93Medium

Which of the following is used to comment multiple lines in C?

Q.94Medium

What will be the output of: float x = ; printf("%f", x);

Q.95Medium

How are structures different from unions in C?

Q.96Hard

What does the static keyword do when used with a global variable?

Q.97Hard

Consider: int arr[10]; int *p = arr; What is p[5] equivalent to?

Q.98Hard

What is the difference between declaration and definition in C?

Q.99Medium

What will be the output of the following code?
int a = 5;
int b = ++a + a++;
printf("%d", b);

Q.100Easy

What is the size of an empty structure in C?