Accel IT Academy Final Exam C3012 L
Accel IT Academy Final Exam C3012 L
Accel IT Academy Final Exam C3012 L
1. What is (void*) 0?
2. What command is used with vi editor to save file and remain in the editing mode?
a) x
b) q!
c) :w
d) :q
3. If a variable is a pointer to a structure, then which of the following operator is used to access
data members of the structure through the pointer variable?
a) .
b) &
c) *
d) ->
4. What will be the output of the program? #include int main() { int y=128; const int x=y;
printf("%d\n", x); return 0; }
a) 128
b) Garbage value
c) Error
d) 0
5. What will be the output of the program ? #include int main() { enum days {MON=-1, TUE,
WED=6, THU, FRI, SAT}; printf("%d, %d, %d, %d, %d, %d\n", MON, TUE, WED, THU, FRI,
SAT); return 0; }
a) -1, 0, 1, 2, 3, 4
b) -1, 2, 6, 3, 4, 5
c) -1, 0, 6, 2, 3, 4
d) -1, 0, 6, 7, 8, 9
a) Infinite times
b) 32767 times
c) 65535 times
d) Till stack overflows
a) &
b) &&
c) ||
d) !
9. What will be output of following program? #include int main(){ int a = 320; char *ptr; ptr =(
char *)&a; printf("%d ",*ptr); return 0; }
a) 2
b) 320
c) 64
d) Compilation error
10. What will be the output of the following program : int main() { int a=1; if (a == 2); printf("C
Program"); return(0); }
a) no Output
b) C Program
c) Compiler Error
d) Linker error
11. What will be output if you will compile and execute the following c code? void main(){ int
i=4,x; x=++i + ++i + ++i; printf("%d",x); }
a) 21
b) 18
c) 12
d) compiler error
a) structures
b) union
c) enum
d) double
14.What will be output if you will compile and execute the following c code? void main(){ int
a=10; printf("%d %d %d",a,a++,++a); }
a) 12 11 11
b) 12 10 10
c) 11 11 12
d) 10 10 12
a) rdir
b) remove
c) rd
d) rmdir
a) 4,5,6
b) 5,6,7
c) 6,5,4
d) 4,4,4
18.I2C follows
a) 1
b) 3
c) 2
d) 0
a) Mode 0
b) Mode 1
c) Mode 2
d) Mode 3
Physical layer
Data link layer
Network access layer
Application Layer
a) 12
b) 10
c) 16
d) 20
26. What is the range of sfr 16?
a) 0 to 1
b) 0 to 255
c) 0 to 65535
d) Z
a) 16
b) 34
c) 32
d) 8
36. There are two 32-bit x 32-bit Multiply instructions that produce________ results
a) 32-bit
b) 64-byte
c) 32-byte
d) 64-bit
a) ARM926
b) ARM946
c) both a & b
d) none of these
a) ARMv1
b) ARMv6
c) ARMv4
d) ARMv7
41. How many CPSR in ARM11 processor
a) 1
b) 0
c) 3
d) 6
a) 8
b) 6
c) 3
d) 5
a) R15
b) R14
c) R13
d) R12
47.What will be output of the following program? main() { int i=277; char *p=&i; p++;
printf("%d",*p); }
a) 277
b) 1
c) 20
d) Suspicious Pointer Conversion
48. What will be output of the following program? int main(){ int a=2,b=7,c=10; c=a==b;
printf("%d",c); return 0; }
49. What will be the output of the program ? #include int main() { union a { int i; char ch[2]; };
union a u; u.ch[0]=3; u.ch[1]=2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; }
a) 3, 2, 515
b) 515, 2, 3
c) 3, 2, 5
d) 515, 515, 4
50. What will be output of the following c program? #include int main(){ int _=5; int __=10; int
___; ___=_+__; printf("%i",___); return 0; }
a) 5
b) 10
c) 15
d) Compilation error