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. Size of void pointer is

  • 1 byte
  • 2 byte
  • 4 byte
  • 8 byte

2. A member is a

  • Variable in a structure
  • Datatype of structure
  • Structure pointer
  • None of above

3. If (*p) and **p is same

  • No
  • Yes

4. What is use of \r in c

  • used to insert a vertical tab
  • used to insert a tab
  • places cursor at the end of line
  • places cursor at the start of line

5. Disadvantage of array in C is

  • We can easily access each element
  • It is necessary to declare too many variables
  • It can store only one similar type of data
  • None of above
Read more from - C Programming Questions Answers - Chapter 1
Post a comment

  • onk_r 4 years ago

    #include<stdio.h>

    int main()
    {
    char c;

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

    return(0);
    }