1.
The ________ operator is true only when both the operands are true.
A. or
B. and
C. boolean
D. bitwiseor
2.
________ function is used to move the file position to desired location within the file.
A. fread
B. fwrite
C. fseek
D. fscanf
3.
The do…while looping statement
A. is executed only once if the condition is true.
B. is also known as entry-controlled loop.
C. is executed at least once if the condition is false.
D. is unconditional looping statement..
4
Which of these assignments is invalid?
A. short s = 48;
B. float f = 4.3;
C. double d = 4.3;
D. int I = `1`;
5.
Which is an invalid name of identifier?
A. world
B. addition23
C. test-name
D. factorial
6.
Which of the following is not an iterative statement?
A. while
B. do while
C. switch
D. for
7.
What is the purpose of getc()?
A. read a character from STDIN
B. read a character from a file
C. read all file
D. read file randomly
8.
Which data structure type is NOT linear from the following?
A. Doubly Link List
B. 2D Array
C. Binary Search Tree
D. Queue
9.
Which of the following sorting algorithms does NOT have a worst-case running time of O(n2)?
A. Insertion sort
B. Merge sort
C. Quicksort
D. Bubble sort
10.
How many times is a do while loop guaranteed to loop?
A. 0
B. Variable
C. 1
D. Infinitely
![]() | ![]() | ![]() |