Compare putchar function with the getchar function, Computer Engineering

Assignment Help:

Compare putchar function with the getchar function.

The following program uses getchar to copy the first word from a line of input entered at the terminal's keyboard. Then, it displays the word on the terminal's screen.

 #include

int c;

main()

{

puts("Enter some words on a line.");

/* Look for white space */

while ((c != ' ') && (c != '\t') && (c != '\n'))

{

c = getchar();

putchar(c);

}

putchar('\n');

}

 


Related Discussions:- Compare putchar function with the getchar function

Matlab, Use the colon operation to create a vector x of numbers -10 through...

Use the colon operation to create a vector x of numbers -10 through 10 in steps of 1. Use matrix operations to create a vector y where each element is 5 more than 2 times the corre

Commutatively of connectives - artificial intelligence, Commutatively of Co...

Commutatively of Connectives You will be aware from the fact that some arithmetic operators have a property that it does not matter which way around you give the operator input

Describing Random Algorithm, Suppose you''re given n numbers and asked to f...

Suppose you''re given n numbers and asked to find a number that is greater than or equal to the median a) What is the lower bound for the worst case complexity of this problem?

Explain busy hour calling rate in telephone traffic, With reference to tele...

With reference to telephone traffic, explain the terms BHCR. BHCR: Busy hour calling rate is explained as the average number of calls originated through a subscriber througho

Find the boolean expression for the logic circuit, Find the boolean express...

Find the boolean expression for the logic circuit shown below. Ans. Output of Gate-1 (NAND) = (AB)' Output of Gate-2 (NOR) = (A'+B)' Output of Gate-3 (NOR) = [(AB)' + (

What is self reference, What is self reference?  The Turing machine tha...

What is self reference?  The Turing machine that ignores its input and prints out a copy of its own description,   we call this as SELF. There is a computable function q: €*€*,

What is mini computer, Q. What is Mini computer? The term minicomputer ...

Q. What is Mini computer? The term minicomputer introduced in 1960's when it was realized that numerous computing tasks don't need an expensive modern mainframe computers howev

What is the role of mar and mdr, What is the role of MAR and MDR? The ...

What is the role of MAR and MDR? The MAR (memory address register) is used to hold the address of the location to or from which data are to be transferred and the MDR(memory d

Find out how many words can be formed from daughter, Find out how many word...

Find out how many words can be formed out of the letters of the word DAUGHTER such that (i)  The vowels are all time together. (ii)  The vowels occupy even places.   Ans:

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd