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
What is a program flowchart?
How can I manipulate individual bits?
Why do we need arrays in c?
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
how do you execute a c program in unix.
Explain what is the heap?
What does the format %10.2 mean when included in a printf statement?
Explain the difference between null pointer and void pointer.
Explain how can I open a file so that other programs can update it at the same time?
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.
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
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
What is the difference between call by value and call by reference in c?
Do you have any idea about the use of "auto" keyword?
Explain what are multibyte characters?