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 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 # 2
What is the fifth element of the array
Int a [3][4] ={1,2,3,4,5,6,7,8,9,10,11}
Choose an answer
4
5
6
7
Previous
Skip
Next
Question # 3
In mixed mode expressions.
Choose an answer
Operands of lower type get automatically converted to higher type
Operands of higher type get automatically converted to lower type.
Operands of higher and lower type get in there changed
Operands of lower type get automatically converted to lower type.
Previous
Skip
Next
Question # 4
While declaring an array in C as datatype array name [size] the size can be.
Choose an answer
Any constant
An integer constant
Any variable
Any initialized integer variable
Previous
Skip
Next
Question # 5
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 # 6
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 # 7
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 # 8
An example of a value parameter is the code above is.
Choose an answer
x
y
c
foo
Previous
Skip
Next
Question # 9
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 # 10
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 # 11
How is a variable accessed from another file.
Choose an answer
The global variable is reference via the extern specifier
The global variable is referenced via the auto specifier
The global variable is referenced via the global specifier
None of above
Previous
Skip
Next
Question # 12
"x" and "y" are called
Choose an answer
Actual parameters
Local variables
Formal parameters
Global variables
Previous
Skip
Next
Question # 13
'C' is a middle level language because.
Choose an answer
It is evolved in Middle age of computer development.
Not having so many features but still is robust
Easier to learn and use
Combines the best features of high low level languages.
Previous
Skip
Next
Question # 14
C program language vas developed by.
Choose an answer
Dennis Ritchie
Ken thompson
Bill Gates
Peter Norton
Previous
Skip
Next
Question # 15
What is the difference between a declaration and a definition of a variable.
Choose an answer
Both can occur multiple times but a declaration must occur first.
There is no difference between them
A declaration occurs once but a definition may occur many times.
Both can occur multiple times but a definition must occur first.
Previous
Skip
Next
Question # 16
The function used to position the file pointer in C is
Choose an answer
Fseekg ()
Seekg()
Fseek()
Seekf()
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
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 # 19
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 # 20
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
Back