main()

{

int i;

clrscr();

printf("%d", &i)+1;

scanf("%d", i)-1;

}

a. Runtime error.

b. Runtime error. Access violation.

c. Compile error. Illegal syntax

d. None of the above



main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d",..

Answer / guest

d, printf( ) prints address/garbage of i,

scanf() dont hav & sign, so scans address for i

+1, -1 dont hav any effect on code

Is This Answer Correct ?    13 Yes 5 No

Post New Answer

More C Code Interview Questions

main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }

3 Answers  


Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }

4 Answers  


void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }

3 Answers  


how to check whether a linked list is circular.

11 Answers   Microsoft,


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

3 Answers  


Write a C function to search a number in the given list of numbers. donot use printf and scanf

5 Answers   Honeywell, TCS,


What is the hidden bug with the following statement? assert(val++ != 0);

1 Answers  


write a program in c to merge two array

2 Answers  


To reverse an entire text file into another text file.... get d file names in cmd line

0 Answers   Subex,


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

1 Answers  


Categories