Programming elements in Java

Programming elements: Software is a set of programs. Every program consists 3 things Identity Variables Methods Identity: Every program has unique identity. We can access programs with identities only. For example Account Holder program can …

typedef in c

typedef: It is a keyword. It is user defined data type. It is used to create synonyms to existing data types. Typedef declarations are not permanent. Once the program execution completes, the synonyms will be …

fprintf() in C

fprintf(): A pre-defined function belongs to stdio.h header file. A function is used to write set of characters into file. This function is used to write stream with specific format. printf() function write the data …

rename() and remove() in C

rename(): It used to rename the specified file. Prototype is: int  rename(char* old, char* new); On success, it returns 0 On failure, it returns -1 remove(): It used to rename the specified file. Prototype is: …

feof() in C

feof(): It used to test whether End of File has reached or not Prototype is: int  feof(FILE* stream) It returns -1 when End Of File has reached. If not, it returns 0

fgets() and fputs() in C

fgets(): It is used to read specified number of characters(String) at a time. Prototype is : char*   fgets(char* str, int size, FILE* stream); It reads “size” bytes from specified “stream” and stores into “str”. On …

rewind() function in c

rewind(): Reset the cursor position to start of the file. Prototype is : void  rewind(FILE* stream);

fseek() in C

fseek(): It is used to move the cursor position in the opened file, to perform read and write operations. Prototype is : int  fseek(FILE* steam,  long offset,  int origin); “offset” is a long type variable …

Write file using fputc()

fputc(): A pre-defined function is used to write the data character by character into file. The prototype is : void  fputc(int x, FILE* stream);

fclose() function in c

fclose(): It is used to close the file after use. It is recommended to release every resource(file) after use. After working resource, releasing a resource is called Proper shut down. Improper shutdown causes loss of …

Courses Enquiry Form