main()

{

int i;

i = abc();

printf("%d",i);

}

abc()

{

_AX = 1000;

}

Answers were Sorted based on User's Feedback



main() { int i; i = abc(); printf("%d",i); ..

Answer / susie

Answer :

1000

Explanation:

Normally the return value from the function is through the
information from the accumulator. 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.

Is This Answer Correct ?    21 Yes 12 No

main() { int i; i = abc(); printf("%d",i); ..

Answer / ashish dayama

gives error b'coz _AX is not declared in function...this will give error untll we take _AX as int variable in abc().....:)

Is This Answer Correct ?    10 Yes 5 No

Post New Answer

More C Code Interview Questions

main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }

1 Answers   TCS,


#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer

1 Answers  


main() { int i=400,j=300; printf("%d..%d"); }

3 Answers  


Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }

1 Answers  






main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }

2 Answers  


main() { int i=5; printf("%d",++i++); }

1 Answers  


main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user

2 Answers   HCL,


main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }

1 Answers  


main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }

1 Answers  


how to return a multiple value from a function?

5 Answers   Wipro,


Categories