C - Files and Preprocessors
C - Files and Preprocessors
61. Which of the following is the correct function prototype for the function main ( ) ?
- main (char argc, char *argv)
- main (int argc, int *argv)
- main (int argc, int **argv [ ] )
- main ( int argc, char * argv [ ] )
62. Which is more correct ?
'int main (int argc, char ** argv)'
'int main (int argc, char* argc [ ] )'?
'int main (int argc, char ** argv)'
'int main (int argc, char* argc [ ] )'?
- both are equally wrong.
- both are equally correct.
- neither is correct
- in main (int argc, char *argv[])
63. The function used to position the file pointer in C is
- seekg( )
- fseekg( )
- fseek( )
- fileseek( )
64. The function used to position the file pointer in C is
- seekg()
- fseekg ()
- fseek()
- fileseek()
65. What file I/O function is used to report the number of bytes from the beginning of the file to the file position indicator ?
- ftell
- freport
- fseek
- fcount
66. 1. fcloseall()
2. clearerr()
3. ferror()
Which o the above are valid ANSI C functions ?
2. clearerr()
3. ferror()
Which o the above are valid ANSI C functions ?
- only option 3
- only option 2
- only options 2 and 3
- options 1, 2, and 3 are all valid ANSI functions.
67. Which standard file is to be include to use the memcpy() function without a warning in an ANSI C compiler ?
- string.h
- memory.h
- stdlib.h
- stdio.h
68. If there is a need to see output as soon as possible. Which function will force the output from the buffer into the output stream ?
- write ()
- output()
- flush ()
- fflush()
69. After a library function returns a failure, which of the following will print out the appropriate error message corresponding to error number given by errno?
- printf (stderr, "s\n", geterror ());
- printerr () ;
- perror (errno);
- strerror (errrno);
70. Which ANSI c standard function could be used to sort a s tring array ?
- qsort
- sort
- asort
- bsort