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

Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


write a program for area of circumference of shapes

0 Answers  


main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

2 Answers   IBM,


how to delete an element in an array

2 Answers   IBM,


#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }

3 Answers   Hexaware,






main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }

1 Answers  


how to return a multiple value from a function?

2 Answers   Wipro,


typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


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

7 Answers  


In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.

0 Answers   TCS,


main() { main(); }

1 Answers  


main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }

1 Answers  


Categories