adplus-dvertising

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.

frame-decoration

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 13 of 42

Explore more Topics under C Programming

Q121.
Which is true about isaplpha(c), where c is an int that can be represented as an unsigned char or EOF.isalpha(c) returns?
Discuss
Answer: (c).Both Non-zero if c is alphabetic & 0 if c is not alphabetic
Q122.
Which is true about isupper(c), where c is an int that can be represented as an unsigned char or EOF.isupper(c) returns?
Discuss
Answer: (d).Both Non-zero if c is upper case & 0 if c is not upper case
Q123.
Which is true about isalnum(c), where c is an int that can be represented as an unsigned char or EOF.isalnum(c) returns?
Discuss
Answer: (c).Both Non-zero if isalpha(c) or isdigit(c) & 0 if not isalpha(c) or not isdigit(c)
Q124.
What is the output of this C code?
#include <stdio.h>
    #include <ctype.h>
    int main()
    {
        char c = 't';
        printf("%d\n", isspace(c));
    }
Discuss
Answer: (a).Non-zero number
Q125.
What is the output of this C code?
#include <stdio.h>
    #include <ctype.h>
    int main()
    {
        char c = 't';
        printf("is :%c\n", tolower('A'));
    }
Discuss
Answer: (b).a
Q126.
Which types of input are accepted in toupper(c)?
Discuss
Answer: (a).char
Q127.
What is the difference in the ASCII value of capital and non-capital of the same letter is?
Discuss
Answer: (c).32
Q128.
ungetc can be used only with getc.
Discuss
Answer: (b).false
Q129.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int n;
        scanf("%d", &n);
        ungetc(n, stdin);
        scanf("%d", &n);
        printf("%d\n", n);
        return 0;
    }
Discuss
Answer: (b).Whatever is typed by the user first time
Q130.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        char n[20];
        fgets(n, 19, stdin);
        ungetc(n[0], stdin);
        scanf("%s", n);
        printf("%s\n", n);
        return 0;
    }
Discuss
Answer: (d).First character of whatever user types first time and whatever user types second time

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!