C/C /C Programming MCQ Part 1 Sample Test,Sample questions

Question:
 A compiler compiles the source code_______

1.complete program in one stroke.

2. one line at a time.

3. two lines at a time.

4.complete programs in two strokes.


Question:
 A declaration float a, b; occupies ___ of memory.
.

1. 1 Byte.

2.4 Bytes.

3.8 Bytes.

4. 16 Bytes.


Question:
 An interpreter reads the source code of a program__

1. One line at a time.

2.Two lines at a time.

3.complete program in one stroke

4.complete program in two strokes.


Question:
 ANSI committee was setup in the summer of___________.

1.1983

2.1985

3.1990

4.1976


Question:
 C language has been developed at_________.

1.AT & T Bell labs, USA.

2. IBM, USA

3.Borland International, USA

4.Sun Microsystems


Question:
 How many keywords are there in ANSI C?

1.32.

2. 33.

3. 42.

4.15.


Question:
 In C every variable has_______.

1.a type.

2.a name.

3.a value

4.a size.


Question:
 In C one statement can declare_________.

1.only one variable.

2.Two variables

3.Ten variables.

4.any number of variables.


Question:
 The C program is converted to machine language using________.

1.An assembler.

2.A compiler

3.An interpreter.

4.An operating system.


Question:
 The keyword volatile keeps the value of variable__________.

1.constant.

2.mutable

3.variant

4.different


Question:
 What is the value of 10%8?

1.8.

2. 2.

3. 1.

4.0.


Question:
A character variable can store only___________.

1.1 character.

2.20 characters.

3.254 characters

4.265 characters.


Question:
A short integer variable occupies memory_________.

1.2 bytes.

2. 4 bytes.

3.1 bytes.

4.8 bytes.


Question:
According to __________ C keywords are reserved words.

1.a compiler.

2.an interpreter.

3.header file.

4.an interpreter and header file.


Question:
Addition of two numbers is performed using _________.

1.arithmetic operator.

2. logical operator.

3. unary operator.

4.comma operator.


Question:
An escape sequence commences with _____________.

1. .

2. /.

3. ?.

4.#.


Question:
An unsigned integer variable contains values________.

1. greater or equal to zero.

2.less than zero.

3.only zeros.

4.(1) & (2) both.


Question:
C variable cannot start with_________.

1.a number

2.an alphabet.

3.a character

4.a string.


Question:
Each instruction in C program is terminated by__________.

1.dot (.).

2.Comma (,).

3.Semi-colon (;)

4.curly brace ({}).


Question:
he extension for C program files by default is_________.

1. .c

2..d

3.obj

4.exe


Question:
How many variables can be initialized at a time?

1.one

2.two.

3.Five

4.any number of variables


Question:
Identify the wrong statement.

1.putchar(65).

2.putchar(‘x’).

3.putchar(“x”).

4. putchar(‘ ‘).


Question:
The & operator displays________.

1.address of the variable.

2. value of the variable

3. result of the variable

4.both (a) & (b).


Question:
The C language is an offspring of ______

1.B language.

2.ALGOL language

3.BASIC language

4.ARITHMETIC language


Question:
The C language is closely associated with _________.

1.MS-DOS.

2.Linux.

3.Unix.

4.MS-Windows.


Question:
The C program is highly case sensitive

1.false

2.true

3.both (A) and (B)

4.none of the above


Question:
The C supports _____ basic data types

1.8

2.2

3.10

4.4


Question:
The C was developed in the year____

1.1972.

2.1960

3.1975

4.1971


Question:
The declaration of C variable can be done____

1.anywhere in the program.

2. in declaration part.

3. in executable part.

4. at the end of the program.


Question:
The execution of a C program start from _____.

1.function

2.Header file

3.main()

4.Processor


Question:
The keyword const keeps the value of a variable_________.

1.constant

2.mutable

3.variant

4.different


Question:
The keyword const keeps the value of a variable_________.

1.constant

2.mutable

3.variant

4.different


Question:
The programs should be written only in_______

1.lower case.

2.upper case

3.title case

4.sentence case.


Question:
The range of character data type is_________.

1. -128 to 127.

2. 0 to 255.

3.0 to 32767

4.126 to 275.


Question:
The role of a compiler is to translate source program statements to_________.

1. object codes

2.octal codes

3.decimal codes.

4.binary codes


Question:
The variable name can be started with__________.
A. 

1.underscore symbol (_).

2.asterisk symbol(*).

3.ampersand symbol(&)

4.minus symbol(-).


Question:
The variables are initialized using_________.

1.greater than(>).

2.equal to (=).

3. twice equal to(==).

4.an increment operator(++).


Question:
The word char is a_______

1.keyword.

2.password

3.header file.

4.statement


Question:
What is the ASCII range for 0 to 9 digits?

1. 48 to 57.

2. 65 to 90

3.97 to 122.

4.86 to 93.


Question:
What is the result of 5&&2?

1.0.

2. 1.

3.2.

4.5.


Question:
What is the result of 5/2?

1. 4.

2. 8.

3.2.

4. 5.


Question:
What is the result of the expression (10/3)*3+5%3?

1.11.

2.10.

3. 8.

4.1.


Question:
What is the result of the expression (23*2) % (int) 5.5?

1.2.

2.1.

3.3.

4. 0.


Question:
What is the value of sizeof(char)?

1.1.

2.0.

3.-1.

4.-2.


Question:
Which function is appropriate for accepting a string?

1.gets().

2.getch().

3.getche().

4.scanf().


Question:
Which is the incorrect variable name__________.

1.else.

2.name

3.age

4.char


Question:
Which of the following declaration is not supported by C?

1.String str;.

2.char *str;.

3.float str = 3e2;.

4.Both String str; & float str = 3e2;.


Question:
Which of the following statement is valid?

1. 5+5=a

2. ss=12.25;

3.st=m * b;

4.is = A+ 10;


Question:
______ decides which operator is to be used first.

1.Hierarchy

2.Priority

3.ladder

4.Precedence


Question:
__________ refers to the accuracy of the calculations.

1. Integrity.

2.Clartiy

3.Simplicity

4.Modularity


More MCQS

  1. C++ Programming MCQS Set-1
  2. C++ Multiple Choice Questions Set-1
  3. C++ Multiple Choice Questions Set-2
  4. C++ Programming MCQS Set-2
  5. C++ Programming MCQS Set-3
  6. C++ Programming MCQS Set-4
  7. C++ (CPP) MCQ Question with Answer
  8. Advanced c++ multiple choice question(MCQS)
  9. OOPS Quiz Questions and Answers(MCQS)
  10. C Programming - MCQ Questions Set 1
  11. C Programming - MCQ Questions Set 2
  12. C Programming - MCQ Questions Set 3
  13. C Programming - MCQ Questions Set 4
  14. C Programming - MCQ Questions Set 5
  15. C++ programming language MCQ Questions Set 1
  16. C++ programming language MCQ Questions Set 2
  17. C++ programming language MCQ Questions Set 3
  18. C++ programming language MCQ Questions Set 4
  19. C++ programming language MCQ Questions Set 5
  20. C++ Programming -Constructors and Destructors
  21. C++ Programming -OOPS Concepts
  22. C++ Programming - References
  23. C++ Programming - Functions
  24. C MCQS:-The ABC of C
  25. C MCQS Interview Questions
  26. C++ Questions and Answers – OOPs Basic Concepts
  27. C++ Questions and Answers – Returning Objects
  28. C Programming MCQ Part 1
  29. C Programming MCQ
  30. Computer Science & Engineering C Multiple Choice Questions set 1
  31. Computer Science & Engineering C Multiple Choice Questions set 2
  32. C Multiple Choice Questions C Functions Set 1
  33. C Multiple Choice Questions C Functions Set 2
  34. C Multiple Choice Questions C Operators
  35. C Multiple Choice Questions & AnswersConditional Expressions
  36. C Multiple Choice Questions & Answers Data Types
  37. C Multiple Choice Questions & Answers File Access
  38. Computer Science & Engineering Cloud Computing MCQs Part 1
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!