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

Scanning tips, Don't scan at more resolution than needed. This saves both D...

Don't scan at more resolution than needed. This saves both Disk and time Space. Typically itisn't useful to scan at more than optical resolution because it adds no new informa

What types of data entry services do you perform, What types of data entry ...

What types of data entry services do you perform? Our business is to understand what data you require entered and in what particular format. After an initial analysis is perfor

How many tables can an append structure be assigned, To how many tables can...

To how many tables can an append structure be assigned. One table can be assigned to append structure.

What is the main function of an assembly, What is the main function of an a...

What is the main function of an assembly It contains code that the common language runtime implements. Microsoft intermediate language (MSIL) code in a portable executable (PE

Define the term web service with example, Define the term web service with ...

Define the term web service with example. A web service is an application that operate over a network-typically, over the Internet. Most typically, a web service is an API that

What is segment - assembler directives, What is SEGMENT - Assembler directi...

What is SEGMENT - Assembler directives SEGMENT:  This directive defines to assembler the start of a segment with name segment-name.  Segment name must be unique and follows the

Why we use addressing schemes, Q Why we use addressing schemes? An ope...

Q Why we use addressing schemes? An operation code of an instruction tells the operation to be performed. This operation is executed on some data stored in memory or register.

Analysts in telecommunications area, Q. Analysts in Telecommunications area...

Q. Analysts in Telecommunications area? Here computer networks which play a critical role in success of any business are designed, implemented and managed. Here Network analyst

What do you mean by complexity of an algorithm, What do you mean by complex...

What do you mean by complexity of an algorithm? The term complexity is used to define the performance of an algorithm. Typically performance is calculated in terms of time or s

Explain the working of thousand line exchanges, E xplain the working of th...

E xplain the working of thousand line exchanges by u sing a combination of uniselectors and two motion selectors. The schematic diagram for such an exchange is demonstrated i

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