Scanf function, Computer Engineering

Assignment Help:

How can the maximum field width for a data item be specified within a scanf function?

When the program is executed, three integer quantities will be entered from the standard input device. Suppose the input data items are entered as

1    2    3

Then the following assignments will result:

a=1, b=2, c=3

If the data had been entered as

 

123  456   789

Then the assignments would be as a=123, b=456, c=789

Now suppose that the data had been entered as

123456789

Then the assignments would be

A=123, b=456, c=789

As before, since the first three digits would be assigned to a, the next three digits to b, and the last three digits to c.

If the data had been entered as

1234   5678  9

the resulting assignment would now be a=123, b=4,c=567

 


Related Discussions:- Scanf function

What is meant by stacked list, What is meant by stacked list? A stacke...

What is meant by stacked list? A stacked list is nothing but secondary list and is showed on a full-size screen unless you have specified its coordinates using the window comm

menu-driven program, Write a menu-driven program to change a time in secon...

Write a menu-driven program to change a time in seconds to other units (minutes, hours, etc.).  The main script will loop to continue until the user chooses to exit.  Every time in

By which transport protocol used, The transport protocol used by TFTP (Triv...

The transport protocol used by TFTP (Trivial File Transfer Protocol) is? The transport protocol used through Trivial File Transfer Protocol is UDP.

Operation research, how to implement a modified distribution method using c...

how to implement a modified distribution method using c/c++

Explain ip address structure, Q. Explain IP Address Structure? Internet...

Q. Explain IP Address Structure? Internet addresses are divided in five types of classes. Classes were designated A through E. class A address space enables a small number of n

How many words can be acquired by the word universal, How many words can be...

How many words can be acquired by arranging the letters of the word 'UNIVERSAL' in different way? In how many of them  (i)  E, R, S takes place together (ii)  No two of the

What is tri-state logic, What is Tri-state logic ? Ans. Tri-state Logi...

What is Tri-state logic ? Ans. Tri-state Logic: In common logic circuits, there are two states of the output, as LOW and HIGH. If the output is not in the LOW state, this

Define operation code, Define Operation code. The Operation code of an ...

Define Operation code. The Operation code of an instruction is a group of  bits that explain such operations as add, sub, ,shift, mul and complement.

Explian service topologies, Explian Service Topologies Service Topolog...

Explian Service Topologies Service Topologies In a service-based architecture there increase dependencies between services resulting from cooperation

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