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
Function have
Choose an answer
Local scope
Block scope
File scope
Function scope
Previous
Skip
Next
Question # 2
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 # 3
It is necessary to declare the type of the function in the calling program if.
Choose an answer
The function return an integer
The function retern an integer
Function returning only the float values
The function return a non integer value.
Previous
Skip
Next
Question # 4
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 # 5
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 # 6
The function sprint f ( ) works like print f ( ), but operates on.
Choose an answer
Data file
String
Stderr
Stdin
Previous
Skip
Next
Question # 7
The given statement of FILE * fptr,
Choose an answer
Defines a pointer to the pre defined structure type FILE
Define a pointer to the user defined structure type FILE.
define a pointer to the pre defined data type FILE DESCRIPTOR
Creates a file pointed by fptr
Previous
Skip
Next
Question # 8
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 # 9
The function 'foo' returns the following type as result.
Choose an answer
Ineger
No result is returned
Float
Double
Previous
Skip
Next
Question # 10
The benefit of using enumeration data types in a program is
Choose an answer
Program becomes shorter
Program becomes longer
Program is easy to understand
Program become complex
Previous
Skip
Next
Question # 11
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 # 12
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 # 13
The type of the controlling expression of a switch statement can not be of the type
Choose an answer
Int
Char
Float
Long
Previous
Skip
Next
Question # 14
A function with no definition
Choose an answer
I san invalid function
Produces syntax error
Result into runtime error
Is allowed and is known as dummy function
Previous
Skip
Next
Question # 15
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 # 16
"c" is called.
Choose an answer
Actual parameter
Local variable
Formal parameter
Global variable
Previous
Skip
Next
Question # 17
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 # 18
The function used to position the file pointer in C is
Choose an answer
Fseekg ()
Seekg()
Fseek()
Seekf()
Previous
Skip
Next
Question # 19
Multiple macro can be defined by placing _____ at teh end of each line except the last.
Choose an answer
/
\
#
$
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
Question # 21
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
Back