Você está na página 1de 5

1. To read from a file which function is used?

a) gets()
b) fgets()
c) fread()
d) getc()

2. What will be the output of the following program


main()
{
int i =-1;
+i;
Printf(“%d”,i);
}
a) –1
b) 0
c) 1
d) 2

3. What will be the output of the following program


main()
{
int(i) [100];
char (a) [100];
float p;
printf(“%d”,size(i)+size(a)+size(p);
}
a) 5
b) 500
c) 304
d) 100

4. What will be the output of the following program


main()
{
printf(“%d”, size of (“”));
}
a)1
b)2
c)0
d) Compiler error
5. What will be the output of the following program
main()
{
int a[]={0,1,2,3,4};
int *p = {a,a+1,a+2,a+3,a+4};
**p = p
printf(“%d”, **p);

a)0
b)1
c)3
d)4

6. Find the odd one out.


a) malloc()
b) calloc()
c) free()
d) realloc()

7. Which one is widely used or cascading


a) common base
b) common emitter
c) common collector
d) all the above

8. what is the characteristics of Ideal Op-Amp


a) infinite output impedance and zero i/p impedance
b) zero output impedance and infinite i/p impedance
c) zero output impedance and zero i/p impedance
d) all the above

9. To add two four bit numbers, how many full and half adders required
a) Fulladder, 1 Half adder
b) Fulladder, 2 Half adder
c) Half adders only
d) 3 Fulladder, 1 Half adder

10. Which one is true about ABSTRACT CLASS


a) It cannot act as base class
b) It cannot be derived
11. Which access specifier cannot use Encapsulation?
a) Public
b) Private
c) Protected
d) b&c

12. Find the incorrect


a) a+=b
b) a*=b
c) a>>=b
d) a**=b

13. int p[3][2][4] = {


{ 0,1,2,3
4,5,6,7 }
{8,9,0,1
4,5,6,7}
{1,2,3,4
9,8,7,5}
}
printf(“%d %d”, p[3][2][4], *(*(*(p+3)+2)+4));
a)3,4
b)7,7
c)5,5
d)5,7

14. To access a private member of a class which extern function is used


a) Friend class
b) Friend function defined in that class

15. How many times the following loop will execute


main()
{
int i;
for (i=0;i<10;i++)
for (j=0;j<10;j++)
}
a) 5
b) 50
c) 500
d) 100
16. What is the output of the following program
main()
{
int i;
for(i=0;i<10;i++)
{
if(i/2 ==0)
printf(“%d”,i+2);
}

a)0,2,4,6,8
b)2,4,6,8,10
c)
d)
17. Union number refer to
a) same memory location
b) different memory location

18. 20 bytes is allocated for *p,what will be the output


{
int *p;
p= str;
str=” aeronautical development agency”;
printf(“%d”,size(p));

}
a)20
b)31
c)error
d)5
19. struct data
{
char a[10];
char s[10];
}
v[2]={“coffee,tea”,”coffee,tea”};
printf(“ %s %s “ v-> a , v -> s)

a) tea coffee tea coffee


b) coffee tea coffee tea
c) Compiler error
d) None of the above
21. main()
{ P=0X562E;
Printf(“%X”,P++);
Printf(“%X”,P++);
}
a) 562F,5630
b) 5640,5630
c) 562F,562F
d) none of the above

22. And gate is ____________


a) Sequential
b) Combinational
c) Both
d) None of he above

23. Which one is incorrect


a) 11001-10010=00000
b) 111010-111000=000010
c) 10101-10100=00001
d)

Você também pode gostar