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. What is the purpose of getc()

  • read a character from STDIN
  • read a character from a file
  • read all file
  • read file random

3. What is dangling pointer in c

  • if pointer is pointing to a memory location from where variable has been deleted
  • if pointer is assigned to more than one variable
  • if pointer is not defined properly
  • none of above

4. 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

5. Break statement is used for

  • Quit a program
  • Quit the current iteration
  • Both of above
  • None of above
Read more from - C Programming Questions Answers - Chapter 1
Post a comment

  • onk_r 8 years ago

    #include<stdio.h>

    int main()
    {
    char c;

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

    return(0);
    }