Explore topic-wise MCQs in Fidelity.

This section includes 45 Mcqs, each offering curated multiple-choice questions to sharpen your Fidelity knowledge and support exam preparation. Choose a topic below to get started.

1.

If every node u in G is adjacent to every other node v in G, A graph is said to be

A. isolated
B. complete
C. finite
D. strongly connected
Answer» C. finite
2.

 Which of the following is TRUE about argv?

A. It is an array of character pointers
B. It is a pointer to an array of character pointers
C. It is an array of strings
D. None of above
Answer» B. It is a pointer to an array of character pointers
3.

Which of the following global variable is set when the log function (defines in ) fails?

A. exceptionno
B. errno
C. log_error
D. error
Answer» C. log_error
4.

Which of the following best describe volatile keyword?

A. Volatile keyword indicates that the variable is stored in volatile memory
B. Volatile keyword indicates that the value of the variable cannot be determined at compile time
C. Volatile keyword instruct the compiler not to do any optimization on that variable
D. Volatile keyword indicates that it cannot be used with const keyword
Answer» D. Volatile keyword indicates that it cannot be used with const keyword
5.

Which of the following is not a stream that is opened by every c program?

A. stdlog
B. stdout
C. stdin
D. stderr
Answer» B. stdout
6.

The compiler will give an error if we attempt to get the address of a varaible with _________ stroage class.

A. register keyword
B. extern keyword
C. static keyword
D. auto keyword
Answer» B. extern keyword
7.

 A utility programme that takes a procedure and searches a library to locate copies of any procedures called but not defined in the first procedure, is called

A. Linker
B. Re-locator
C. Loader
D. Text editor
Answer» B. Re-locator
8.

An assembly language is a .......... programming language but BASIC is ....... programming language

A. problem oriented.....low level
B. problem oriented.........high leve
C. machine oriented......high level
D. machine oriented......low level
Answer» D. machine oriented......low level
9.

While coding in c programming for "call by reference" we pass

A. Address of variable
B. Value of variable
C. Either value or address
D. Both value and address
Answer» B. Value of variable
10.

Which of the following is incorrect statement

A. All array variable have same type
B. An array is the collection of variable
C. Array variable can be used individually
D. None of the mentioned
Answer» E.
11.

Array index always start from 

A. 0
B. 1
C. 2
D. 3
Answer» B. 1
12.

In c programming a function can return ___________

A. Single value
B. Double value
C. Many value
D. all of the above
Answer» B. Double value
13.

Which of the following is correct statement?

A. Variable name must start with underscore
B. Variable name must have digit
C. keyword can not be a variable name
D. None of the mentioned
Answer» D. None of the mentioned
14.

#include  struct p { int x; char y; }; int main() { struct p p1[] = {1, 92, 3, 94, 5, 96}; struct p *ptr1 = p1; int x = (sizeof(p1) / 3); if (x == sizeof(int) + sizeof(char)) printf(""%d\n"", ptr1->x); else printf(""falsen""); } 

A. Compile time error
B. 1
C. Undefined Behaviour
D. FALSE
Answer» E.
15.

Trace the output of the code #include  void foo(int*); int main() { int i = 10; foo((&i)++); } void foo(int *p) { printf(""%d\n"", *p); }   

A. 10
B. Some garbage value
C. Segmentation fault/Code crash
D. Compile time error
Answer» D. Compile time error
16.

what among the following is a unconditional control structure:

A. do-while
B. if-else
C. goto
D. for
Answer» D. for
17.

The symbol that shows you where the mouse is on the screen is called the:

A. icon
B. mouse pointed
C. director
D. arrow
Answer» C. director
18.

Which header file is essential for using strcmp() function?

A. string.h
B. strings.h
C. text.h
D. strcmp.h
Answer» B. strings.h
19.

what is the original(or highest level)directory on a disk?

A. root
B. tree
C. c>
D. d>
Answer» B. tree
20.

Type the name of the single dot that represents the smallest graphic unit that can be displayed on the screen?

A. unit
B. bit
C. byte
D. pixel
Answer» E.
21.

The choices file options and so are called:

A. items
B. reserved words
C. terms
D. queries
Answer» B. reserved words
22.

The number of the relational operators in the c language is:

A. 4
B. 6
C. 3
D. 1
Answer» C. 3
23.

c is a __________ language:

A. high level
B. low level
C. middle level
D. machine level
Answer» D. machine level
24.

A link is:

A. a compiler
B. an active debugger
C. a c interpreter
D. a analyzing tool in c
Answer» E.
25.

The maximum length of a variable in c is:

A. 8
B. 16
C. 32
D. 64
Answer» B. 16
26.

The continue command cannot be used with:

A. for
B. switch
C. do
D. while
Answer» C. do
27.

The size of string variable is:

A. 1 byte
B. 8 byte
C. 16 bytes
D. none of the above
Answer» E.
28.

 What is the use of putchar()?

A. The character written
B. EOF is an error occurs
C. Nothing
D. Both a & b
Answer» E.
29.

Which is true?

A. The symbolic constant EOF is defined in
B. The value is typically -1
C. Both a & b
D. Either a or b
Answer» D. Either a or b
30.

What is the use of getchar()?

A. The next input character each time it is called
B. EOF when it encounters end of file
C. Both a & b
D. None of the mentioned
Answer» D. None of the mentioned
31.

The value of EOF is_____.

A. -1
B. 0
C. 1
D. 10
Answer» B. 0
32.

What is the default return-type of getchar()?

A. char
B. int
C. char *
D. Reading character doesnt require a return-type
Answer» C. char *
33.

What does the following command line signify? prog1I prog2 

A. It runs prog1 first, prog2 second
B. It runs prog2 first, prog1 second
C. It runs both the programs, pipes output of prog1 to input of prog2
D. It runs both the programs, pipes output of prog2 to input of prog1
Answer» D. It runs both the programs, pipes output of prog2 to input of prog1
34.

For a typical program, the input is taken using.

A. scanf
B. Files
C. Command-line
D. None of the mentioned
Answer» E.
35.

Which among the following is odd one out?

A. printf
B. fprintf
C. putchar
D. scanf
Answer» E.
36.

 Is the following statement a declaration or definition?  extern int i;

A. Declaration
B. Definition
C. Function
D. Error
Answer» B. Definition
37.

By default a real number is treated as a

A. float
B. double
C. long double
D. far double
Answer» C. long double
38.

Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

A. rem = 3.14 % 2.1;
B. rem = modf(3.14, 2.1);
C. rem = fmod(3.14, 2.1);
D. Remainder cannot be obtain in floating point division
Answer» D. Remainder cannot be obtain in floating point division
39.

fputs function is used to

A. write characters to a file
B. takes 2 parameters
C. returns a character
D. requires a file pointer
Answer» D. requires a file pointer
40.

The size of a structure can be determined by   a. size of variable name  b. sizeof(struct tag)

A. Only a
B. Only b
C. Both a and b
D. none of the above
Answer» D. none of the above
41.

Which of the following is the correct way of declaring a float pointer: 

A. float ptr;
B. float *ptr
C. *float ptr;
D. None of the above
Answer» C. *float ptr;
42.

Array passed as an argument to a function is interpreted as 

A. Address of the array
B. Values of the first elements of the array
C. Address of the first element of the arrayd.) Number of element of the array
Answer» D.
43.

what is the maximum number of dimensions an array in C may have ?

A. two
B. eight
C. twenty
D. theoratically no limit only practical limits are memory size and compilers
Answer» E.
44.

O(N)(liner time) is better than O(1) constant time.

A. TRUE
B. FALSE
Answer» C.
45.

 Smallest element of array's index is called

A. lower bound
B. upper bound
C. range
D. Extraction
Answer» B. upper bound