#include<stdio.h>

main()

{

FILE *ptr;

char i;

ptr=fopen("zzz.c","r");

while((i=fgetch(ptr))!=EOF)

printf("%c",i);

}



#include<stdio.h> main() { FILE *ptr; char i; ptr..

Answer / susie

Answer :

contents of zzz.c followed by an infinite loop

Explanation:

The condition is checked against EOF, it should be checked
against NULL.

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Code Interview Questions

what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  


main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024

2 Answers   HCL,


Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };

1 Answers  


main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 Answers  


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }

29 Answers   IBM, TCS, UGC NET, Wipro,


x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);

2 Answers  


Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.

5 Answers   Amazon, Microsoft,


what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);

2 Answers  


can u give me the c codings for converting a string into the hexa decimal form......

1 Answers  


Design an implement of the inputs functions for event mode

0 Answers   Wipro,


Categories