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

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

Q.22Easy

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

Q.23Easy

Which operator has the highest precedence in C?

Q.24Medium

In C, a pointer variable stores which of the following?

Q.25Medium

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

Q.26Medium

Which of the following correctly initializes an array of 5 integers?

Q.27Medium

What is the default return type of a function in C if not explicitly specified?

Q.28Medium

What does the break statement do in a loop?

Q.29Medium

Which of the following is used to access members of a structure using a pointer?

Q.30Medium

In C, what is the purpose of the #define directive?

Q.31Medium

What is the correct way to declare a function that takes no parameters and returns an integer?

Q.32Hard

What will be the output of: int x = 5; printf("%d", ++x);?

Q.33Hard

Consider a pointer ptr pointing to an integer array. What does ptr[2] represent?

Q.34Hard

What is the time complexity of searching for an element in an unsorted array using linear search?

Q.35Hard

What will be the result of executing: int a = 5, b = 10; int *ptr = &a; ptr = &b; printf("%d", *ptr);?

Q.36Hard

Which of the following statements about static variables is TRUE?

Q.37Easy

What is the size of an integer variable in most modern C compilers?

Q.38Easy

Which of the following is NOT a valid C data type?

Q.39Easy

What is the purpose of the & operator in C?

Q.40Easy

Which keyword is used to create a constant variable in C?