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
String concatenating means.
Choose an answer
Combining two strings.
Extracting a substring out of a string.
Merging two strings.
Comparing the two string to define the larger one.
Previous
Skip
Next
Question # 2
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 # 3
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 # 4
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 # 5
"x" and "y" are called
Choose an answer
Actual parameters
Local variables
Formal parameters
Global variables
Previous
Skip
Next
Question # 6
C program language vas developed by.
Choose an answer
Dennis Ritchie
Ken thompson
Bill Gates
Peter Norton
Previous
Skip
Next
Question # 7
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 # 8
An example of a value parameter is the code above is.
Choose an answer
x
y
c
foo
Previous
Skip
Next
Question # 9
Which is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 10
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 # 11
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 # 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
What is the only function all C program must contain.
Choose an answer
Start ()
System ()
Main ()
Program ()
Previous
Skip
Next
Question # 14
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 # 15
When a program is running the value of a constant
Choose an answer
Can be changed
Cannot be used
I always hidden
Cannot be changed
Previous
Skip
Next
Question # 16
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 # 17
What's wrong in the following statement provide K is a variable of type Int.
(k=2 , k <= 12, k++)
Choose an answer
The increment should always be ++k
The variable must always be the letter i when using a for loop
The variable k can't be initialized
The commas should be semicolons.
Previous
Skip
Next
Question # 18
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 # 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 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 # 21
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
Back