Difference between fopen() and open()?
Answers were Sorted based on User's Feedback
Answer / ada
open() is a system call, and fopen() is a stdio library
function.
| Is This Answer Correct ? | 29 Yes | 2 No |
Answer / rinal doshi
open() is the function created by the user......... which
can be used to perform a specific task....
fopen() belongs to FILES..... this is a in built user
defined function which is used to open a file which is
already existing with the opening mode or create a new
file....and which returns a pointer
syntax:
file_ptr=fopen("file name","opening mode");
| Is This Answer Correct ? | 5 Yes | 7 No |
Answer / vignesh1988i
open() is the function created by the user......... which can be used to perform a specific task....
fopen() belongs to FILES..... this is a in built user defined function which is used to open a file which is already existing with the opening mode or create a new file....and which returns a pointer
syntax:
file_ptr=fopen("file name","opening mode");
| Is This Answer Correct ? | 2 Yes | 16 No |
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<n1-1;i++) { if( !( (a1[i]>a1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?
Is there any possibility to create customized header file with c programming language?
Why pointers are used?
how do you redirect stdout value from a program to a file?
Should a function contain a return statement if it does not return a value?
20. main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); } Answer:??????
Write a C program to perform some of the operation which can be performed using Single linked list
What are signals in C?
I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.
Why is c called c?
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..???