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
In the statement # define , the symbol # must commence from
Choose an answer
Any where in any line
First character of that line
Any where out side of main () always.
None of above
Previous
Skip
Next
Question # 2
To read the formatted input data from a file, which of the following function is used.
Choose an answer
Getchar ()
fgets()
fscanf ()
scanf()
Previous
Skip
Next
Question # 3
Given b=110 and c =20, what is the value of 'a' after execution of the expression a = b -= c + =5?
Choose an answer
10
450
110
-10
Previous
Skip
Next
Question # 4
The given statement FILE "fptr;
Choose an answer
Defines a pointer to the pre defined structure type FILE.
Defines a pointer to the usere defined structure type FILE
Defines a pointer to the pre-defined data type FILE DESCRIPTOR.
Creates a file pointed by fptr
Previous
Skip
Next
Question # 5
"x" and "y" are called
Choose an answer
Actual parameters
Local variables
Formal parameters
Global variables
Previous
Skip
Next
Question # 6
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 # 7
What is the meaning of self referential structure.
Choose an answer
Array of structure
Single structure
Structure calling it's parent structure.
Structure calling another structure.
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
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 # 10
Which of the following is "stringzizing operator"?
Choose an answer
$
%
#
?
Previous
Skip
Next
Question # 11
Which of the following is a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 12
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 # 13
Function have
Choose an answer
Local scope
Block scope
File scope
Function scope
Previous
Skip
Next
Question # 14
Information will be passed to the function via special identifier is called.
Choose an answer
Arguments
Parameters
Both A and B above
Elements
Previous
Skip
Next
Question # 15
When function is recursively called all the automatic variable are stored in a.
Choose an answer
Stack
Array
Register
Linked list
Previous
Skip
Next
Question # 16
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 # 17
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 # 18
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
Question # 19
The function 'foo' returns the following type as result.
Choose an answer
Ineger
No result is returned
Float
Double
Previous
Skip
Next
Question # 20
Which of the following correctly access the seventh element stored in foo, an array with 100 elements.
Choose an answer
foo{6}:
Foo {7}:
Foo
Foo():
Previous
Skip
Next
Question # 21
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
Back