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
Suppose the return type of function f is void. Which one of the following statements is true.
Choose an answer
Function f does not contain a return statement.
Function f does not have parameters
Function f return a generic value
Function f does not work correctly
Previous
Skip
Next
Question # 2
While working with the binary Strems for 'C' I/O file operations.
Choose an answer
Only the binary values can be read and can be written
No character transition take place
Character translation takes place
Both a and b above
Previous
Skip
Next
Question # 3
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 # 4
Which of the following is not a character constant.
Choose an answer
'\60
'/x 24'
'sum'
'A'
Previous
Skip
Next
Question # 5
Which of the following is "stringzizing operator"?
Choose an answer
$
%
#
?
Previous
Skip
Next
Question # 6
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 # 7
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 # 8
Which of the following is not a valid name for a C variable.
Choose an answer
Hairaj
Hello _ raj
Hello raj
None of above
Previous
Skip
Next
Question # 9
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 # 10
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 # 11
The function sprint ( ) works like print f ( ) , but operates on.
Choose an answer
Strings
Data in a file
Stderr
Stdin
Previous
Skip
Next
Question # 12
If you declare an array without stating the elements it will be set to
Choose an answer
A null value
Zero
Garbage value
Set of words
Previous
Skip
Next
Question # 13
What does the "auto" specifier do.
Choose an answer
It automatically initializes a variables to 0
It indicates that a variables memory will automatically be preserved
It automatically increments the variable when used.
It automatically initializes a variable to NULL
Previous
Skip
Next
Question # 14
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 # 15
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Question # 16
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 # 17
How would you declared constant of 5 called 'MYCONST"?
Choose an answer
Constant MYCONST =5
Int my const =5
# define MYCONST 5
#define MYCONST =5
Previous
Skip
Next
Question # 18
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 # 19
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 # 20
How many characters can is string hold when declared as char name [20];?
Choose an answer
18
19
20
21
Previous
Skip
Next
Question # 21
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
Back