C/C / Sample Test,Sample questions

Question:
 #include are _______ files and #include "somefile.h ________ files.

1. Library, Library

2.Library, user-created header

3.User-created header, library

4.They can include all types of file

Posted Date:-2022-03-19 05:02:45


Question:
 #pragma exit is primarily used for?

1.Checking memory leaks after exitting the program

2.Informing Operating System that program has terminated

3.Running a function at exitting the program

4.No such preprocessor exist

Posted Date:-2022-03-19 05:06:23


Question:
#include is called

1.Preprocessor directive

2.Inclusion directive

3.File inclusion directive

4.None of the mentioned

Posted Date:-2022-03-19 04:58:59


Question:
#include statement must be written.

1.Before main()

2.Before any scanf/printf

3.After main()

4.It can be written anywhere

Posted Date:-2022-03-19 05:05:31


Question:
A preprocessor is a program.

1.That processes its input data to produce output that is used as input to another program

2.That is nothing but a loader

3.That links various source files

4.All of the mentioned

Posted Date:-2022-03-19 05:03:59


Question:
C preprocessors can have compiler specific features.

1.True

2.False

3. Depends on the standard

4.Depends on the platform

Posted Date:-2022-03-19 04:59:53


Question:
If #include is used with file name in angular brackets.

1.The file is searched for in the standard compiler include paths

2.The search path is expanded to include the current source directory

3. Both a & b

4.None of the mentioned

Posted Date:-2022-03-19 05:10:08


Question:
Preprocessor feature that supply line numbers and file names to compiler is called?

1.Selective inclusion

2.macro substitution

3.Concatenation

4.Line control

Posted Date:-2022-03-19 05:00:34


Question:
Property which allows to produce different executable for different platforms in C is called?

1.File inclusion

2.Selective inclusion

3.Conditional compilation

4.Recursive macros

Posted Date:-2022-03-19 04:58:03


Question:
The #include directive

1.ells the preprocessor to grab the text of a file and place it directly into the current file

2.Statements are typically placed at the top of a program

3.both a & b

4.None of a & b

Posted Date:-2022-03-19 05:08:10


Question:
The C-preprocessors are specified with _________symbol.

1.#

2.$

3." "

4.None of the mentioned

Posted Date:-2022-03-19 05:07:06


Question:
The preprocessor provides the ability for _______________.

1.The inclusion of header files

2.The inclusion of macro expansions

3.Conditional compilation and line control.

4.All of the mentioned

Posted Date:-2022-03-19 05:09:01


Question:
What is the output of this C code?

int main()
{
enum {ORANGE = 12, MANGO, BANANA = 11, APPLE};
printf("APPLE = %d
", APPLE);
}

1.APPLE= 11

2. APPLE= 12

3.APPLE= 23

4.APPLE= 0

Posted Date:-2022-03-19 05:52:46


Question:
Which of the following are C preprocessors?

1.#ifdef

2. #define

3.#endif

4.All of the mentioned

Posted Date:-2022-03-19 05:04:41


More MCQS

  1. help4info.com
  2. help4info.com
  3. help4info.com
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!