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
What will be the output of: int x = 5; printf("%d", ++x);?
Consider a pointer ptr pointing to an integer array. What does ptr[2] represent?
What is the time complexity of searching for an element in an unsorted array using linear search?
What will be the result of executing: int a = 5, b = 10; int *ptr = &a; ptr = &b; printf("%d", *ptr);?
Which of the following statements about static variables is TRUE?
What is the size of an integer variable in most modern C compilers?
Which of the following is NOT a valid C data type?
What is the purpose of the & operator in C?
Which keyword is used to create a constant variable in C?
What will be the memory size of the following struct? struct Point { int x; char c; int y; }
What is the correct way to initialize an array of 5 integers with all elements as 0?
Which of the following correctly declares a pointer to a pointer?
What is the output of sizeof(char) in C?
What is the scope of a variable declared inside a function in C?
How many times will the loop execute? for(int i = 0; i < 5; i++)
What is the difference between calloc() and malloc() in C?
What will be the value of x after: int x = 5; x += 3;
What is the correct syntax to open a file in C?
Consider the following code: int arr[] = {1, 2, 3, 4, 5}; int *ptr = arr; What is the value of *(ptr + 2)?
What is the output of the following code? for(int i = 1; i <= 3; i++) { if(i == 2) continue; printf("%d ", i); }