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 i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000

3 Answers   HCL,


void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā€œ%dā€, i); }

2 Answers  


why nlogn is the lower limit of any sort algorithm?

0 Answers  


main() { static int var = 5; printf("%d ",var--); if(var) main(); }

1 Answers  


write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .

2 Answers  






write a c program to Reverse a given string using string function and also without string function

1 Answers  


#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }

1 Answers  


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }

1 Answers  


main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;

1 Answers  


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }

1 Answers  


Categories