47. What will be the output of following code :
// Assume all header files are included
main()
{
int i;
i = abc();
printf("%d",i);
}
abc()
{
_AX = 1000;
}
A. 1000
B. 10001
C. 100
D. Runtime Error
View Answer & Explanation
Ans. a
Explanation : Here _AH is the pseudo global variable denoting the
accumulator. Hence, the value of the accumulator is set 1000 so the function returns value 1000
48. What will be the output of following code :
// Assume all header files are included
main(){
int a= 0;int b = 20;char x =1;char y =10;
if(a,b,x,y)
printf("hello");
}
A. hello
B. hell
C. Hello
D. Runtime Error
View Answer & Explanation
Ans. a
Explanation : The comma operator has associativity from left to right. Only the rightmost value is returned and the other values are evaluated and ignored.
