Which of these statements are false w.r.t File Functions?
i)fputs() ii)fdopen() iii)fgetpos() iv)ferror()
A)ii B)i,ii C)iii D)iv

Answer Posted / garima

fputs->a function which puts the text in the stream
fdopen->a function to associate the stream with the file handle
fgetpos->a function to get the current pointer position
ferror->is a "macro" to find whether there is an error in
the entered stream
therefore the ans is (iv) ferror..which is not a function
but a macro...:)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a program flowchart?

605


How can I manipulate individual bits?

608


Why do we need arrays in c?

583


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

631


how do you execute a c program in unix.

636






Explain what is the heap?

622


What does the format %10.2 mean when included in a printf statement?

1087


Explain the difference between null pointer and void pointer.

669


Explain how can I open a file so that other programs can update it at the same time?

591


write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

2719


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

632


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

726


What is the difference between call by value and call by reference in c?

619


Do you have any idea about the use of "auto" keyword?

664


Explain what are multibyte characters?

629