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. Continue statement used for

  • To continue to the next line of code
  • To stop the current iteration and begin the next iteration from the beginning
  • To handle run time error
  • None of above

2. What is wild pointer in c

  • a pointer which we need to write in future
  • a pointer which has bad naming convention
  • a pointer which has no limit
  • a point which has not initialized

3. The compiler in C ignores all text till the end of line using

  • //
  • /
  • */
  • none of above

4. What is true about fputs function

  • write to a file
  • takes two parameters
  • requires a file pointer
  • all of above

5. Due to variable scope in c

  • Variables created in a function cannot be used another function
  • Variables created in a function can be used in another function
  • Variables created in a function can only be used in the main function
  • None of above
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);
    }