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 is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 2
Which of the following is a not a keyword of C langauge.
Choose an answer
Void
Volatile
Getchar
Short
Previous
Skip
Next
Question # 3
What does the "auto" specifier do.
Choose an answer
It automatically initializes a variables to 0
It indicates that a variables memory will automatically be preserved
It automatically increments the variable when used.
It automatically initializes a variable to NULL
Previous
Skip
Next
Question # 4
The size of an int must be greater than or equal to that of a
Choose an answer
Long int
Short int
Float
Char
Previous
Skip
Next
Question # 5
Which of the following is "stringzizing operator"?
Choose an answer
$
%
#
?
Previous
Skip
Next
Question # 6
Every C program consists of _____________ functions.
Choose an answer
Only one
Only two
One or many
None of the above
Previous
Skip
Next
Question # 7
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 # 8
How would you declared constant of 5 called 'MYCONST"?
Choose an answer
Constant MYCONST =5
Int my const =5
# define MYCONST 5
#define MYCONST =5
Previous
Skip
Next
Question # 9
An example of a value parameter is the code above is.
Choose an answer
x
y
c
foo
Previous
Skip
Next
Question # 10
How many union members can be initialized.
Choose an answer
Only one member of union at any one time.
Any number of members of a union at one time
Union members can not be initialized
Only two members of a union at any one time.
Previous
Skip
Next
Question # 11
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 # 12
What is the output of the following program.
#include <studio. h>
int c [10]={1,2,3,4,5,6,7,8,9,10}
main ()
{int a, b =0:
for {a<10;++a)
if c[a]:
[romt f (%d" . n);}
Choose an answer
20
24
25
30
Previous
Skip
Next
Question # 13
The getchar ()function reads a
Choose an answer
String from a file
Character from a file
String from the key board
Character from the keyboard
Previous
Skip
Next
Question # 14
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Question # 15
If suppose a variable 'a' is initialized as int a = oxff, then what will be output for the below code.
(a << 4>>12)? printf ("Humaira') printf (" iram")
Choose an answer
Syntax Error
1
10
100
Previous
Skip
Next
Question # 16
Which of the following is not a correct variable type.
Choose an answer
Float
Real
Int
Double
Previous
Skip
Next
Question # 17
To most widely used method for interpreting the bit setting as non negative integer is.
Choose an answer
EBCD system
BCD system
ASCII system
Binary number system
Previous
Skip
Next
Question # 18
"c" is called.
Choose an answer
Actual parameter
Local variable
Formal parameter
Global variable
Previous
Skip
Next
Question # 19
The function sprint f ( ) works like print f ( ), but operates on.
Choose an answer
Data file
String
Stderr
Stdin
Previous
Skip
Next
Question # 20
The declaration "void foo (int, x int & y)" is called a
Choose an answer
Function body
Function type
Function stereotype
Function prototype
Previous
Skip
Next
Back