Q.1
In C, malloc() function is used in dynamic memory allocation in which header file.
Ans.
(A)stdio.h (B)math.h
(C)conio.h (D)stdlib.h
Q.2
Null character is represented by.
Ans.
(A)\0 (B)\End
(C)\null (D)\
Q.3
Literal means……..
Ans.(A) a string (B) a string
constant (C) a character (D) an alphabet
Q.4
An Ampersand before the name of a variable denotes.
Ans.
(A)data types (B)address (C)variables
(D)constants
Q.5
The output of printf(“%U”,-1) is:
Ans.
(A) Zero (B)minimum
int value (C)maxium int value (D)Error message
Q.6 The meaning of conversion
character for data input is.
Ans.(
A)Data item is a long integer (B)Data
item is an unsigned decimal integer
(C)Data item is a short integer (D)None of the above
Q.7
What is the output of the following program segment?
main()
{
long i = 65536;
printf(“%d\n”, i);
}
Ans.(A)
0 (B) 65536 (C) -1 (D) 65
Q.8
Printf() function returns which value when an error occurs.
Ans.
(A)Positive value (B)Zero (C)Negative
value (D)None
of these
Q.9
Which pair of function below are used for single character I/O.
Ans.
(A)Getchar() and putchar() (B)Scanf()
and printf()
(C)Input()
and output() (D)None of these
Q.10
Output of the following program fragment is
x = 6;
y = x++;
printf(“%d%d”, x, y);
Ans.
(A) 6, 7 (B) 6, 6 (C) 7, 6 (D) 7, 7
Answer Sheet:-Q.1(D) Q.2(A) Q.3(B)
Q.4(B) Q.5(C) Q.6(C) Q.7(A)
Q.8(C) Q.9(A) Q.10 (C)
No comments:
Post a Comment