Welcome to the Input and Output in C MCQs Page
Dive deep into the fascinating world of Input and Output in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Input and Output in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Input and Output in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.
Check out the MCQs below to embark on an enriching journey through Input and Output in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.
Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Input and Output in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!
Input and Output in C MCQs | Page 28 of 42
Explore more Topics under C Programming
cmd> myprog one two three
/* myprog.c */
#include<stdio.h>
int main(int argc, char **argv)
{
printf("%c\n", **++argv);
return 0;
}
cmd> myprog one two three
/* myprog.c */
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char **argv)
{
printf("%s\n", *++argv);
return 0;
}
cmd> sample 1 2 3
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
int j;
j = argv[1] + argv[2] + argv[3];
printf("%d", j);
return 0;
}
cmd> sample Good Morning
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%d %s", argc, argv[1]);
return 0;
}
#include<stdio.h>
void fun(int);
int main(int argc)
{
printf("%d ", argc);
fun(argc);
return 0;
}
void fun(int i)
{
if(i!=4)
main(++i);
}
cmd> sample "*.c"
/* sample.c */
#include<stdio.h>
int main(int argc, int *argv)
{
int i;
for(i=1; i<argc; i++)
printf("%s\n", argv[i]);
return 0;
}
cmd> sample
/* sample.c */
#include<stdio.h>
int main(int argc, char **argv)
{
printf("%s\n", argv[argc-1]);
return 0;
}
cmd> sample friday tuesday sunday
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%c", **++argv);
return 0;
}
cmd> myprog friday tuesday sunday
/* myprog.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%c", *++argv[1]);
return 0;
}
cmd> sample one two three
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
int i=0;
i+=strlen(argv[1]);
while(i>0)
{
printf("%c", argv[1][--i]);
}
return 0;
}
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!