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
The storage class of a local variable is
Choose an answer
Auto
Static
Extern
Register
Previous
Skip
Next
Question # 2
Which of the following is not a character constant.
Choose an answer
'\60
'/x 24'
'sum'
'A'
Previous
Skip
Next
Question # 3
Which of the following functions are used in unformatted data files.
Choose an answer
Fscanf
Fwrite
Fread
fscanf & fwrite
Previous
Skip
Next
Question # 4
What is the correct value to return to the operating system upon the successful completion of a program
Choose an answer
1
1
0
2
Previous
Skip
Next
Question # 5
The arguments in main () function are known as.
Choose an answer
Program parameter
Command line arguments
Both a and b above
None of these
Previous
Skip
Next
Question # 6
The address of the starting element of an array is.
Choose an answer
Represented by subscripted variable of the starting element.
Represented by the array name
Not used by the compiler
Represented by the size of the array
Previous
Skip
Next
Question # 7
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 # 8
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 # 9
Which of the following operators has right to left associativity.
Choose an answer
++
--
+ =
All a ,b and c above
Previous
Skip
Next
Question # 10
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 # 11
The declaration int (*a)[8] : is
Choose an answer
An array of pointers
A pointer to an array
A pointer to a function
Function returning pointer
Previous
Skip
Next
Question # 12
The associativity of ++ operator is
Choose an answer
For arithmetic expression and
For pointer expression
For pointer expression and
For pointer express in and
Previous
Skip
Next
Question # 13
Every C program consists of _____________ functions.
Choose an answer
Only one
Only two
One or many
None of the above
Previous
Skip
Next
Question # 14
Which of the following is a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 15
How many number of tokens are there in the following statement provided 'valeus' is an integer variable.
if value == 21)
Choose an answer
3
4
5
6
Previous
Skip
Next
Question # 16
int *p[5] ; is used for
Choose an answer
Fixed row size and varying column size
Fixed row size and fixed column size
Varying row size and varying column size.
For storing integers
Previous
Skip
Next
Question # 17
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
Question # 18
Find teh output of the following program
void main (){
int i = ' hello";
print f (i):
}
Choose an answer
Syntax error
Runtime error
h
Hello
Previous
Skip
Next
Question # 19
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 # 20
The function fprint is used in the program.
Choose an answer
When too + many print calls have been used in the program.
In place of printf , as it uses more memory
When the type of the variables to be printed are not known
When the output is to be printed on to a file
Previous
Skip
Next
Question # 21
Which one of the following will declare a pointer to an integer at address 0 x 200 in memory.
Choose an answer
int " x, " x = 0 x 200;
int " x, = & 0 x 200;
int " x, = "0 x 200;
int " x, = 0 x 200
Previous
Skip
Next
Back