Tag Archives: purpose


Summarize the purpose of the format strings (like %s, %d, %c) that are’ commonly used within the printf function, with an example for each.10m Jun2006

Summarize the purpose of the format strings (like %s, %d, %c) that are’ commonly used within the printf function, with an example for each.10m Jun2006 If printf function format includes format specifiers (subsequences beginning with %), the additional arguments following format are formatted and inserted in the resulting string replacing their respective specifiers. It can… Read More »

Write the syntax and explain the purpose of the following function: Fprintf( ) 2m Dec2005

Write the syntax and explain the purpose of the following function: 2m Dec2005   (iii) Fprintf( ) Description The C library function int fprintf(FILE *stream, const char *format, …) sends formatted output to a stream. Declaration Following is the declaration for fprintf() function. Parameters stream — This is the pointer to a FILE object that identifies… Read More »

Write the syntax and explain the purpose of the following functions : Fclose() 2m Dec2005

Write the syntax and explain the purpose of the following functions : 2m Dec2005 (ii) Fclose( ) Description The C library function int fclose(FILE *stream) closes the stream. All buffers are flushed. Declaration Following is the declaration for fclose() function. Parameters stream — This is the pointer to a FILE object that specifies the stream… Read More »

Write the syntax and explain the purpose of the following functions : Fseek() 2m Dec2005

Write the syntax and explain the purpose of the following functions : 2m Dec2005 (i) Fseek( ) Description The C library function int fseek(FILE *stream, long int offset, int whence) sets the file position of the stream to the given offset. Declaration Following is the declaration for fseek() function. Parameters stream — This is the… Read More »