APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : S1 and S2

Year : 2018

Term : MARCH

Branch : BIOTECHNOLOGY

Scheme : 2015 Full Time

Course Code : CS 100

Page:16





PDF Text (Beta):

return 0;

}
Input:

$ g++ mainreturn.cpp -o main $ ./main
geeks for geeks

Output:

You have entered 4 arguments:
./main geeks
for

geeks
Properties of Command Line Arguments:

e They are passed to main() function.

० They are parameters/arguments supplied to the program when it is invoked.

e They are used to control program from outside instead of hard coding those values inside the
code.

٠ argv[argc] isa NULL pointer.

° argv[0] holds the name of the program.

‎argv[1] points to the first command line argument and argv[n] points last argument.‏ ٭

‎16.
‎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. int
fseek(FILE *stream, long int offset, int whence) Parameters
stream - This is the pointer to a FILE object that identifies the stream. offset - This is the
number of bytes to offset from whence.
whence - This is the position from where offset is added. It is specified by one of the following constants
- 1. SEEK_SET-Beginning of file

‎2. SEEK_CUR-Current position of the file pointer
3. SEEK_END-End of file

‎PART B

‎17.a)
‎೫1೧೦1೪೮೮ #include
void main()

‎{ int number, sum = 0, rem = 0, cube = 0, temp;

Similar Question Papers