C-Command Line Arguments Questions and Answers
Practice ModeShowing 10 of 129 questions
Q1
The maximum combined length of the command-line arguments including the spaces between adjacent arguments is
Answer: Option D
Q2
According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments?
Answer: Option A
Q3
What do the 'c' and 'v' in argv stands for?
Answer: Option C
Q4
Find the output
#include "stdio.h"
void main ( )
{
int x;
fopen ("raja.txt","w");
fopen("milu.txt", "w");
x=FOPEN_MAX;
printf("%d", x);
}
Answer: Option C
Q5
The files linked and accessed through the library functions are known as
Answer: Option B
Q6
The files linked and accessed using system calls are known as
Answer: Option A
Q7
Find the output
#incude "stdio.h"
void main ()
{
FILE *p;
p=fopen ("raja. txt", "w");
printf("%d", p->fd);
}
Answer: Option A
Q8
What is the content of the file ?
#include "stdio.h"
void main ( )
{
FILE *p;
p=fopen ("letter.txt", "wt");
putc('Go',p);
putc ('od',p);
rewind(p);
putc(Fo',p);
putc('Fo',p);
fclose(p);
}
Answer: Option C
Q9
Which of the following functions is most appropriate for storing numbers in a file ?
Answer: Option B
Q10
Which of the following is not true about ftell?
Answer: Option D