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

Subtraction of 01000-01001 using 2's complement method, Subtraction of 0100...

Subtraction of 01000-01001 using 2's complement method. Ans. Firstly 1's complement of 01001 is 10110 and 2's complement is 10110+ 1 =10111. Thus   01000 =  01000 - 01001

What is ipc, What is IPC? What are the various schemes available? The t...

What is IPC? What are the various schemes available? The term IPC (Inter-Process Communication) explains various ways by which different process running on some operating syste

Network topology, According to the report, network 1 and network 2 are not ...

According to the report, network 1 and network 2 are not able to reach network 3. As shown on OTBNetwork Topology above, OTB Inc. has 2 routing protocols running due transition iss

Connectivity options accessible to internet subscribers, What are the diffe...

What are the different connectivity options accessible to Internet Subscribers? Explain in detail. Internet Connectivity Options: Internet access is perhaps one of the ma

What do you mean by consumer behavior, What do you mean by consumer behavio...

What do you mean by consumer behavior? Explain the factors influencing consumer behavior? Factors Influencing Consumer Choice: Consumer choice or decision behaviour refers to t

Purpose of storage - computer architecture, Purpose of storage: Several...

Purpose of storage: Several different forms of storage, based on different natural phenomena, have been invented.  So far, no practical universal storage medium persists, and a

Write an applet that display the directory holding html file, Write an appl...

Write an applet that display the directory holding the HTML file that started the applet and the directory from which, applet class file was loaded. An applet is here given bel

Illustrate code segment with example, CODE SEGMENT ; Set DS register ...

CODE SEGMENT ; Set DS register MOV AX, DATA     ;    boiler plate code to set the DS register so that the MOV DS, AX          ;    program can access the data segment.

What is focussed ion beam fix, What is Focussed Ion Beam Fix? A FIB Fix...

What is Focussed Ion Beam Fix? A FIB Fix (Focussed Ion Beam) Fix is simply performed onto a terminated chip. FIB is a somewhat exotic process where a particle beam is capable t

Draw and elucidate the block diagram 8259, Draw and elucidate the block dia...

Draw and elucidate the block diagram of programmable interrupt controller 8259. The 8259A adds 8 vectored priority encoded interrupts to microprocessor. It can be expanded to 6

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