How would you use the functions fseek(), freed(), fwrite() and ftell()?
Answer / Rahul Jha
In C, these functions are used for handling files.nnfseek(): This function is used to set or change the file position indicator for a stream. The file position indicator of a stream points to the next unread character in the stream.nnfreed(): There's no such function as freed() in C standard library, it seems like there might be a mistake in the question.nnfwrite(): This function writes data from an array of characters or from a string pointed to by a pointer to a stream. It returns the number of elements successfully written.nnftell(): This function returns the current file position indicator for a given stream as a long integer number of bytes.n
| Is This Answer Correct ? | 0 Yes | 0 No |
How do we declare variables in c?
Which of the following are valid "include" formats? A)#include and #include[file.h] B)#include (file.h) and #include C)#include [file.h] and #include "file.h" D)#include <file.h> and #include "file.h"
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }
Explain how can I prevent another program from modifying part of a file that I am modifying?
What are the basic data types associated with c?
plz answer.. a program that takes a string e.g. "345" and returns integer 345
how can u print a message without using any library function in c
main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }
What is a char in c?
Why do we use header files in c?
enum DAY { sunday, monday, tuesday }; enum EDAYS { friday, saturday, sunday }; void main() { int i =0; if( i == sunday) { printf("%d",i); } } what would be the output?