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 the use of function overloading in C?
Differentiate between declaring a variable and defining a variable?
What are the types of pointers?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is bss in c?
How do you determine whether to use a stream function or a low-level function?
How do I use strcmp?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Explain what is the difference between null and nul?
Write a c program to demonstrate character and string constants?
What is dangling pointer in c?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
explain how do you use macro?
What does s c mean in text?