answersLogoWhite

0


Best Answer

double would be %e, %f or %g (depending on the format you want), long int would be %ld or %lu (signed or unsigned), long double would be %Le, %Lf or %Lg.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

You mean printf? It's %f or %g (preferably the latter).

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the format specifier use with the data type double in c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a format specifier?

There are many types of format specifier. Exp:%d (To show the integer) %c(To show the character) %f(Float are digits with decimal points to use it to show them) %s(String to show the string)


In what programming language is SSCANF a reference?

SSCANF is the Go Programming Language and originated from the C Programming Language. SSCANF is a function that reads data with specified format from a given stream source.


What is the meaning of percent s in C programming?

%d is used as a format mask to represent an integer.Any of the "formatted" io functions can use this: printf, fprintf, scanf, etc.Example:int i = 0;printf("%d", i); // prints the value of iThis is a format specifier which is used to identify that the given input is an integer or notIn C: c%d means the remainder dividing c with din printf/scanf format string: %d means an integer dataFor extracting or inserting data which is signed integer in decimal format


If a data-item is declared as a protected access specifier then it can be accessed?

A class method or attribute (data item) that is declared protected can be accessed only by methods of the same class or by methods of derived classes of the class.


In ANSI C you can hide data by using private access specifier Justify?

One can always declare a datatype as static which will limit the scope to the file only. this way data hiding can be achived. For more clearance on the same please refer 'the C programming language'. Data hiding means only relevant data is visible to the user and all the background information is hidden from the user. In c++, the variables are named as data members and these can be hidden with the help of private access specifier. In procedural languages, variables(global variables) are free to flow from functions to functions and hence they were not secured. But in C++, only the class in which the data members are being declared can access them by using private specifier. As, the data members and also member functions of a class cannot be accessed outside the class if they have private access so, they get hidden from the user and hence the data hiding is achieved. Also in inheritance when we derive a class from the base class then the derived class cannot access the private members of the base class. In addition, if a class is derived from another class privately i.e. for example syntax : class B : private A , is used then all the public and protected members (not private) becomes private to class B and cannot be accessed outside the class B, even by using the object of class B. Hence, data hiding is achieved in C++ through private access specifier.

Related questions

What are Format specifiers in C language?

Format specifier is a sequence passed the as the formatting data as by argument


What is control specifier of long double data type in C?

%ld


What is a format specifier?

There are many types of format specifier. Exp:%d (To show the integer) %c(To show the character) %f(Float are digits with decimal points to use it to show them) %s(String to show the string)


What does format in computer language mean?

In computer language word 'format' means cleaning of data structures on a hard drive or other mass memory device. After formatting all data are lost.


What do you mean by access specifier in c?

There are no access specifiers in C. All functions and data are public.


Why format specifier is not necessary in language C plus plus?

Format specifiers are not necessary because we can use the much more flexible insertion operator to insert formatted text in an output stream, or the extraction operator to extract formatted data from an input stream. Format specifiers are simply far too low-level and can only handle built-in data types such as strings, integrals and floats, they cannot handle more complex data types such as classes and data structures and we cannot create new specifiers to cater for them. But in C++ we can simply overload the insertion and extraction operators to cater for any data type we wish, thus providing a consistent means of inserting any object into an input stream or extracting it from an output stream.


In what programming language is SSCANF a reference?

SSCANF is the Go Programming Language and originated from the C Programming Language. SSCANF is a function that reads data with specified format from a given stream source.


What is the format of writing data interpretation?

What is a good format for data interpretation


How do you format data?

usally by clicking on the data you wish to format an option will come up asking you if you want to format it


What is the first no for sialkot?

Data structure is related to the algorithm, ie solution of the requirements.whereas Data Type is component of a programming language, which can be used to implement the required data structure (organization of data and format).For example if the requirement say that a LIST is required, and in C programming language , there is not LIST data type BUT LIST CAN BE REALISED(IMPLEMENTED ) in C.


Does xml replace html in the future of world wide web?

XML probably will not replace HTML. XML is a language to define categories of data. HTML is a language to define format.


What is meant by a Java Long Datatype?

The Java Long Datatype is a 64 bit data language, this format of Java is important to be skilled in for anyone that are to be doing C++ programing language.