What will be the output of the program (myprog.c) given below if it is executed from the command line?
cmd> myprog one two three
/* myprog.c */
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char **argv)
{
printf("%s\n", *++argv);
return}
Which of the following statements are FALSE about the below code?
int main(int ac, char *av[])
{
}
What will be the output of the program (myprog.c) given below if it is executed from the command line?
cmd> myprog friday tuesday sunday
/* myprog.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%c", *++argv[1]);
return}
What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample friday tuesday sunday
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%c", *++argv[);
return}
What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample monday tuesday wednesday thursday
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
while(--argc> printf("%s", *++argv);
return}
What will be the output of the program (sample.c) given below if it is executed from the command line (Turbo C in DOS)?
cmd> sample 1 2 3
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
int j;
j = argv[+ argv[+ argv[3];
printf("%d", j);
return}
What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample one two three
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
int i= i+=strlen(argv[1]);
while(i> {
printf("%c", argv[1][--i]);
}
return}
What will be the output of the program (myprog.c) given below if it is executed from the command line?
cmd> myprog30
/* myprog.c */
#include<stdio.h>
int main(int argc, char **argv)
{
int i;
for(i=i<argc; i++)
printf("%s\n", argv[i]);
return}
If the following program (myproc.c) is present in the directory "C:\TC" then what will be output of the program if run it from DOS shell?
/* myproc.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%s", argv[0]);
return}
What will be the output of the program (sample.c) given below if it is executed from the command line (turbo c under DOS)?
cmd> sample Good Morning
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%d %s", argc, argv[1]);
return}
What will be the output of the program (myprog.c) given below if it is executed from the command line?
cmd> myprog one two three
/* myprog.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
int i;
for(i=i<argc; i++)
printf("%c", argv[i][0]);
return}
What will be the output of the program
#include<stdio.h>
void fun(int);
int main(int argc)
{
printf("%d ", argc);
fun(argc);
return}
void fun(int i)
{
if(i!= main(++i);
}