1. Which of the following function gives the current position in the file
-
putw()
ftell()
fseek()
2. A pointer to a pointer is a form of
-
Multiple indirections
A chain of pointers
Both a and b
3. The 'continue' statement is used to continue -
-
to the next statement of the current function
to the next statement of the calling function
to the begin of the current statement
4. Continue statement is used
-
to go to the next iteration in a loop
come out of a loop
exit and return to the main function
5. The following program segment in C++
const int m =10;
int &n = m;
n=11;
count << m << n; will give result
-
Compile time error
run time error
prints 1111
6. What will be the output of the following program?
void main()
{ char x = 'd' ;
switch (x)
{ case 'b' : puts ("01 001");
break;
default: puts ("1 2 3");
break
case 'R' puts ("I II III" );
}
}
-
123
01 001
I II III
7. The following statement in‘C’ language : int **a ;
-
is illegal
is legal but meaningless
syntactically and semantically is correct
8. What will be the output of the following statement ?
printf( 3 + “goodbye”);
-
goodbye
odbye
bye
9.What will be the output of the following statements ?
long int a = scanf(“%ld%ld”,&a,&a); printf(“%ld”,a);
-
error
garbage value
10. The escape sequence '\n' means
-
new line,
variable tab,
vertical tab,
11. Which header file is used for dynamic memory allocation in C
-
math.h
stdio.h
conio.h
12.What is the output?:
void main() {
int a 1, b=0;
if (a, b) {
printf("EXAM");
}
}
-
exam is printed,
EXAM is printed,
compiler error,
13. The keyword used to transfer control from a function back to the calling function is -
-
switch
goto
go back
14. Write the output of the following program segment:
void main()
(int i=1, j=1;
for (;;) {
if (i>5) break; else j+-i; printf("%d",j); i+=j;
-
2 5
32
33
15. What is the valid range of numbers for int type of data?
- 0 to 256
-32768 to +32767
-65536 to +65536
16. Write down the output of the following program segment(s):
void main()
{
int i;
for (i=0;i<=10; i++); printf("%d", i);
}
-
display 1 to 10
17. A C program is a combination of.?
-
Statements
Functions
Variables
18. If an integer needs two bytes of storage then maximum value of a signed interger is
-
216 – 1
215 – 1
19. An array cannot be initialized provided it is -
-
automatic
external
static
20. C language is used in the development of .?
-
Databases
Graphic applications
Word Processors
21. printf (‘’% d’’, p r I n t f (‘’ tim’’) ) ;
-
results in a syntax error
outputs t i m3
outputs garbage
22. C language was invented to develop which Operating System.?
-
Android
Linux
Ubuntu
23. The number of possible value of m, such that m & 0x3f equals 0x23 is
24. The string terminator in C-language is -
-
'\b'
'\&'
'\c'
25. The statement p r I n t f ( ‘’% d’’, sizeof (‘’ ‘’)); prints
-
an error message
garbage
26. A pointer is
-
address of a variable
a variable for sorting address
data type of an address variable
27. Which of the following is allowed in a C Arithmetic instruction
-
[]
{}
()
28. The library function strcmp("abc","ABC"); returns -
-
32
32
29. A. int constant var =10;
-
b. int
onst var = 10;
const int var = 10;
30. Which of the following is not a data type in c
-
Primary data type
Secondary data type
Derived data type
Post a Comment
0 Comments