1 |
Which one of the following will read a character from the keyboard and will store it in the variable. |
c = getc ()
getc (&c)
c = getchar ()
c = getchar (stdin)
|
2 |
Which one of the following will declare a pointer to an integer at address 0 x 200 in memory. |
int " x, " x = 0 x 200;
int " x, = & 0 x 200;
int " x, = "0 x 200;
int " x, = 0 x 200
|
3 |
What is the difference between a declaration and a definition of a variable. |
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.
|
4 |
What is the output of the above program. |
5
8
Runtime error
Syntax error
|
5 |
How many union members can be initialized. |
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.
|
6 |
The number of arguments for realloc ( ) function is. |
0
1
2
3
|
7 |
When function is recursively called all the automatic variable are stored in a. |
Stack
Array
Register
Linked list
|
8 |
Which of the following function calculates the square of 'X' in C. |
sr (X)
Pow (2,X)
Pow(X,2)
None of above
|
9 |
What is the base data type of a pointer variable by which the memory would be allocated to it. |
Int
Float
No data type
Unsigned int
|
10 |
Given b=110 and c =20, what is the value of 'a' after execution of the expression a = b -= c + =5? |
10
450
110
-10
|
11 |
Function have |
Local scope
Block scope
File scope
Function scope
|
12 |
A function with no definition |
I san invalid function
Produces syntax error
Result into runtime error
Is allowed and is known as dummy function
|
13 |
The storage class controls |
Life time of a variable
Linkage of a variable
Scope of a variable
a , b and c above
|
14 |
Which operator from the following has the lowest priority. |
Assignment operator
Division operator
Common operator
Conditional operator
|
15 |
The associativity of ++ operator is |
For arithmetic expression and
For pointer expression
For pointer expression and
For pointer express in and
|
16 |
'C' is a middle level language because. |
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.
|
17 |
# define preprocessors command can be used for defining. |
Macros
For loop
Symbolic constants
Both a and c
|
18 |
Malloc ( ) function return pointer to. |
Integer
Void
Character
Structure
|
19 |
String concatenating means. |
Combining two strings.
Extracting a substring out of a string.
Merging two strings.
Comparing the two string to define the larger one.
|
20 |
Element of the array are accessed by |
Index
Mathematical function
Accessing the function in built in data structure.
Int l;
|
21 |
To most widely used method for interpreting the bit setting as non negative integer is. |
EBCD system
BCD system
ASCII system
Binary number system
|
22 |
The function sprint f ( ) works like print f ( ), but operates on. |
Data file
String
Stderr
Stdin
|
23 |
The function fprint is used in the program. |
When too + many print calls have been used in the program.
In place of printf , as it uses more memory
When the type of the variables to be printed are not known
When the output is to be printed on to a file
|
24 |
Which of the following is a not a keyword in C langauge. |
Void
Volatile
Short
Gatchar
|
25 |
It is necessary to declare the type of the function in the calling program if. |
The function return an integer
The function retern an integer
Function returning only the float values
The function return a non integer value.
|
26 |
Array are passed as the arguments to a function by |
Value
Reference
Constant value
Both a and b
|
27 |
The given statement FILE "fptr; |
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
|
28 |
What are the values of a, b are if the following code fragemnt is executed int a , b = 7 a=b<4? b << 1, b> 4?7 >> 1 a; |
Garbage and 7
7 and 3
3 and 7
3 and 3
|
29 |
What's wrong in the following statement provide K is a variable of type Int. (k=2 , k <= 12, k++) |
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.
|
30 |
The type of the controlling expression of a switch statement can not be of the type |
Int
Char
Float
Long
|