which one of follwoing will read a character from keyboard
and store in c
a)c=getc()
b)c=getchar()
c)c=getchar(stdin)
d)getc(&c)
e)none

Answer Posted / moolshankershukla

first define :
char c;
printf("enter character ");
c=getchar();

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is console in c language?

801


What is variable initialization and why is it important?

799


where are auto variables stored? What are the characteristics of an auto variable?

798


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3357


what are bit fields in c?

1131






How can I manipulate individual bits?

767


How is a pointer variable declared?

751


How do I get an accurate error status return from system on ms-dos?

830


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4771


What is malloc return c?

754


What is the use of bit field?

846


What is a pointer and how it is initialized?

788


What are the general description for loop statement and available loop types in c?

873


Why is c fast?

779


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

23011