R4RIN
Articles
Java 8
MCQS
C/C MCQ Quiz Hub
OOPS Quiz Questions and Answers(MCQS)
Choose a topic to test your knowledge and improve your C/C skills
1. Almost every C program begins with the statement
# include <stdio.h>
Print f( )
SCAN( )
Main( )
2. The two operators && and || are
Relational operators
Equality operators
Arithmetic operators
Logical operators
3. A variable that holds the memory address of another object is called
Memory variable
Constant
Pointer
Integer
4. Enumeration is a
Set of legal values possible for a variable
List of operators
List of strings
Set of numbers
5. In C, square brackets [ ] are used in
Statements
Functions
Arrays
Pointer
6. Main( ) is an example of
Header
Statement
User defined function
Library function
7. By default, any real number in ‘C’ is treated as
depends upon memory model that you are using
a long double
a double
a float
8. Which of the following operators in ‘C’ programming language takes only integer operands?
+
*
/
%
9. An identifier in C
can obtain both upper case and lower case
is made up of letters numerals and the underscore
is a name of thing such as variable and function
all of these
10. Which of the following is a storage class specification in C?
static
automatic
external
all of these
11. Which language makes use of object oriented approach?
C
C++
Java
C++ and Java
12. Each block of a C program is referred as
Integer
Event
Variables
Function
13. Whenever a C program is executed, execution starts from
Scanf function
Void function
Any function
Main function
14. allows the user to use
One-dimensional array
Two-dimensional array
Three dimensional array
Multi dimensional arrays
15. _ groups a number of program statements into a single unit.
Array
Structure
Variable
Function
16. When one loop is constructed within another loop it is called a
For loop
Do loop
Do-while loop
Nested loop
17. By pressing ___ key, the user can exit the turbo C environment.
Ctrl + X
Alt + X
Ctrl + A
Enter
18. In programming, repeating some code is usually called ___
Looping
Compiling
Structure
Control structure
19. The first character of the variable name
May be a number
Must be an alphabet
Must be an underscore
Must be an alphabet or underscore
20. In which header file are the library functions used for I/O purpose kept?
stdio.h
math.h
stdio.h or math.h
none of these
21. The method of checking the pseudo codes is called ___
Sequencing
Walk through
Branching
Iteration
22. Keywords cannot be used as ____
Variables
Variables or constant names
Constant names
None of the above
23. Which of the following are called white space characters?
The blank space
New line character
Blank space & new line character
None of the above
24. _ are declared within the body of a function.
Variables
Local variables
Main functions
Arrays
25. _ is an effective tool for programming scientific, mathematical and engineering computations.
Parameter
Main function
Recursion
Local variable
26. The functions that are defined according to our requirements are called ____
Good functions
Modules
User defined functions
Library functions
27. In the for loop structure, the clauses namely ___ are optional.
Assign and logic
Assign and alter
Logic and alter
Assign, logic and alter
28. Subscripted variable is any type such as
Int
Float
Int, float or char
Char
29. In which of the following it is convenient to group related data items as one entry?
Array
Matrix
Token
Determinant
30. An unary operator! Represents
Unary minus
Logical not operator
Decrement operator
Increment operator
31. An unary operator! Represents
Unary minus
Logical not operator
Decrement operator
Increment operator
32. The single character input/output functions are
scan f ( ) and print f ( )
get char ( ) and print f ( )
scan f ( ) and put char ( )
get char ( ) and put char ( )
33. The general form of the condition expression is
Expression ? expression 2 : expression 3
Expression 3? Expression 2: expression 1
Expression 2? expression 3? Expression 1
None of these
34. The break statement is used to exit from a
Do loop
For loop
Switch statement
All of these
35. Which is not necessary when using bar codes in supermarkets?
Price on the shelf
Price on the goods
Point-of sale (POS) terminal
Check digit on the bar code
36. By using ____ the speed of the process can be increased.
Integer
Unsigned integer
Short integer
Long integer
37. A variable is an algebraic expression that temporarily assumes the properties of a constant is called
Function
Dummy parameter
Parameter
Operator
38. A function can return
Two values
No value
Only one value
Many values
39. __ have no meaning outside the body of a function.
Variables
Main functions
Global variables
Local variables
40. The most popular loop for array manipulation is the ___ loop.
for
while
do while
any
41. Which of the following statements is correct?
Provides no features to manipulate composite objects
C provides no file access features
C provides no input-output features
All of these
42. The most common use of the one dimensional array in C is
Function
Data
Character
String
43. Which header file should be included if it is required to develop a function that can accept variable number of arguments?
Stdarg.h
Stdio.h
Stdlib.h
Vardar.h
44. A single character input from the keyboard can be obtained by using the function
Scan f( )
Put char( )
Get char( )
Print f( )
45. The operator << and >> are
Assignment operators
Bitwise logical operators
Logical operators
Relational operators
46. An error in the program is called
A function
A bug
A variable
An error only
47. Ready made library functions are used for
Output
Input
Neither input nor output
Input and output
48. The maximum length of the variable is ___ characters.
22
32
52
62
49. Which one of the following indicates the solution method?
Algorithm
Program
Flow chart
All the above
50. Which of the following is an intermediate language?
Pseudo code
Basic
FORTRAN
Computer language
51. Each element in a structure has a
Unique variable
Unique name
Name
Space
52. For two-dimensional arrays data are usually entered
Array wise
Element wise
Row-wise
Column-wise
53. The __ is a program that links the object code of the program with the library function code that is necessary for the program to run.
C linker
Compiler
C compiler
Editing
54. Which of the following statement is used to skip a part of the loop?
Break
Continue
Both
None of the above
55. The method in which a problem has been divided into many smaller problems is called ___
Problem approach
Top Down approach
New approach
None of these
56. C contains which of the following two special pointer operators?
% and &amp;
&amp; and &amp;&amp;
*and &amp;&amp;
* and &amp;
57. The header file `setjmp.h’ can be used for providing
Character type identification and translation
Support for string handling functions
Diagnostic and debugging assistance
Links to assembly language for calls
58. The general form of do while statements is
Do while expression
Do statement while (expression);
Do statement while statement
Do expression while statement
59. A library files that come with C are
Program examples
Files that contain function which carry out various commonly used operations and calculations
The compiler and liner
Text editor for program development
60. The math library is set up for the user by the file
Time .h
Math .h
Limits .h
Float .h
61. Running any C program involves
Creating/ editing
Compiling and linking
Executing
All the above steps
62. In do-while structure, the condition is checked at ___
the beginning of the loop
the end of the loop only
the centre of the loop
any statement of the loop
63. _ is in between English and the high level computer language.
Mnemonic code
Binary code
Pseudo code
Flow chart
64. The functions scan f( ) reads
any possible variable type
any possible number
character strings
a single character
65. An expression
is a name that substitutes for a sequence of characters
causes the computer to carry out some action
is a collection of data objects and operations that can be evaluated to a single value
all of these
Submit