download Mastguru Android App

Question Detail

What is the purpose of getc()

  • read a character from STDIN
  • read a character from a file
  • read all file
  • read file random
Similar Questions :

1. A variable in c

  • must have a valid datatype
  • can't have a name same as keyword
  • must have a name starting with a character
  • All of above

2. Which of the following below is/are valid C keywords

  • integer
  • int
  • null
  • none of above

3. Which is invalid name of identifier

  • world
  • addition23
  • test_name
  • factorial

4. To access the members of structure which symbol is used

  • *
  • -
  • ,
  • .

5. printf() belongs to which library of c

  • stdlib.h
  • stdio.h
  • stdout.h
  • stdoutput.h
Read more from - C Programming Questions Answers - Chapter 1
Post a comment

  • onk_r 7 years ago

    #include<stdio.h>

    int main()
    {
    char c;

    printf("Enter character: ");
    c = getc(stdin);
    printf("Character entered: ");
    putc(c, stdout);

    return(0);
    }