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

Types of pipelines - computer architecture, Types of Pipelines: Instr...

Types of Pipelines: Instructional pipeline  It is used where different stages of an instruction fetch and execution take place in a pipeline. Arithmetic pipeline

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

Determine the benefits of mainframe computers, Determine the benefits of ma...

Determine the benefits of mainframe computers Government agencies, large businesses, and universities usually use this type of computer. So: This computer is common t

Explain lexical substitution during macro expansion, Explain Lexical substi...

Explain Lexical substitution during macro expansion ? Lexical substitution is used to produce an assembly statement from a model statement. Model statements have 3 kinds of str

Explain hardwired control organization, Q. Explain Hardwired control organi...

Q. Explain Hardwired control organization? In the hardwired organization control unit is designed as a combinational circuit. The control unit is applied by gates, flip-flops,

What are the elements of analysis model, What are the elements of Analysis ...

What are the elements of Analysis model? i. Data Dictionary ii. Entity Relationship Diagram iii. Data Flow Diagram iv. State Transition Diagram v. Control Specifica

Define a segment index or an internal index, The field that contains a segm...

The field that contains a segment index or an internal index is called ? Ans. Target datum consists of a segment index or an internal index.

Which is the slowest sorting procedure, The slowest sorting procedure is   ...

The slowest sorting procedure is    Bubble Sort is the slowest sorting process.

Determine about the web authoring tools, Web authoring tools CGI was cons...

Web authoring tools CGI was considered excellent in the beginning since it was also open standard. The only drawback it suffered was that it was slow. Major software developers v

Functional units of a computer system, Functional units of a computer syste...

Functional units of a computer system: Digital computer systems consist of 3 distinct units. These units are as follows:  Central Processing unit Input unit and Output unit.

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