More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
PPSC Computer Science Chapter 8 C Programming Online Test MCQs With Answers
Question # 1
Which one of the following will read a character from the keyboard and will store it in the variable.
Choose an answer
c = getc ()
getc (&c)
c = getchar ()
c = getchar (stdin)
Previous
Skip
Next
Question # 2
With the following declaration , the correct answer is.enum rgb (red = -1, green , blue)
Choose an answer
red = -1, green = -2, blue = -3
red = -1 , green = 0 blue = 1
red = -1 , green = 2 blue = 3
All above alternative are illegal declarations.
Previous
Skip
Next
Question # 3
The storage class controls
Choose an answer
Life time of a variable
Linkage of a variable
Scope of a variable
a , b and c above
Previous
Skip
Next
Question # 4
The header file contains the function prototypes to the standard input /output library functions and information used by them.
Choose an answer
<std I/O .h>
<stdio .h>
< stdib.h>
<studio.h>
Previous
Skip
Next
Question # 5
Which command is used to skip the rest of a loop and carry on from the top of the loop again.
Choose an answer
Break
Resume
Continue
Skip
Previous
Skip
Next
Question # 6
Identify the correct statement from the following statements.
Choose an answer
Typedef int integer
Typedef int integer;
Typedef int = integer :
Typedef integer int ;
Previous
Skip
Next
Question # 7
What is the only function all C program must contain.
Choose an answer
Start ()
System ()
Main ()
Program ()
Previous
Skip
Next
Question # 8
An example of a value parameter is the code above is.
Choose an answer
x
y
c
foo
Previous
Skip
Next
Question # 9
Every C program consists of _____________ functions.
Choose an answer
Only one
Only two
One or many
None of the above
Previous
Skip
Next
Question # 10
A function protoype is
Choose an answer
A definition of the function
a declaration statement in the called program
A declaration statement in the called program
A function call in the program
Previous
Skip
Next
Question # 11
"x" and "y" are called
Choose an answer
Actual parameters
Local variables
Formal parameters
Global variables
Previous
Skip
Next
Question # 12
Which of the following function calculates the square of 'X' in C.
Choose an answer
sr (X)
Pow (2,X)
Pow(X,2)
None of above
Previous
Skip
Next
Question # 13
Array are passed as the arguments to a function by
Choose an answer
Value
Reference
Constant value
Both a and b
Previous
Skip
Next
Question # 14
What is the base data type of a pointer variable by which the memory would be allocated to it.
Choose an answer
Int
Float
No data type
Unsigned int
Previous
Skip
Next
Question # 15
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Back