answersLogoWhite

0


Best Answer

%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 i
This is a format specifier which is used to identify that the given input is an integer or not
In C: c%d means the remainder dividing c with d

in printf/scanf format string: %d means an integer data
For extracting or inserting data which is signed integer in decimal format

User Avatar

Wiki User

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

Wiki User

11y ago

s,d,f,etc are all data types in a c program and you need % to define it in scanf and printf what is the difference between s and %s, s is just a variable whereas %s is a data type denoting a sting.for example you can just enter scanf("%s",name)which gets a string called name

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

The %s token is a format specifier used in strings to designate the insertion point for a string variable. Other tokens include %c (character), %d (integer), %f (floating point value), %x (hexadecimal value) and so on.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

The %c token is a format specifier used in format strings, as used by the printf() and scanf() family of functions:

char x;

printf ("Enter a character: ");

scanf ("%c", &x);

printf ("The character '%c' has the ASCII character code %d\n", x, (int) x);

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the meaning of percent s in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What has the author Robert Lafore written?

Robert Lafore has written: 'Object-oriented programming in Microsoft C++' -- subject(s): Object-oriented programming (Computer science), C++ (Computer program language), C. 'Microsoft C. Programming for the I.B.M.Personal Computer' 'Object-oriented programming in C++' 'Windows Programming Made Ridiculously Easy Book' 'The Waite Group's C Programming Using Turbo C++ (The Waite Group)' 'Microsoft C programming for the IBM' 'The Waite Group's Microsoft C programming for the PC' -- subject(s): C (Computer program language), IBM microcomputers, Microsoft C (Computer program), Microsoft C., Programming


What has the author Douglas A Troy written?

Douglas A. Troy has written: 'TheC programming language' -- subject(s): Microcomputers, Programming, Programming languages (Electronic computers) 'The C programming language' -- subject(s): C (Computer program language)


What has the author C Vieillefond written?

C. Vieillefond has written: 'Programming the 80286' -- subject(s): Intel 80286 (Microprocessor), Programming


What has the author Edmund W Faison written?

Edmund W. Faison has written: 'Borland C [plus plus] 4 object-oriented programming' 'Borland C++ 3 object-oriented programming' -- subject(s): Borland C++, C++ (Computer program language), Object-oriented programming (Computer science) 'BorlandC[plus plus] 4.5 object-oriented programming' -- subject(s): Borland C., C., Object-oriented programming (Computer science) 'Borland C++ 3.1 object-oriented programming' -- subject(s): Borland C++, C++ (Computer program language), Object-oriented programming (Computer science)


What has the author John C May written?

John C. May has written: 'Programming primer for the Macintosh' -- subject(s): Macintosh (Computers), C++ (Computer program language), Programming 'Symantec C [plus] [plus] for windows' -- subject(s): C 'Extending the Macintosh Toolbox' -- subject(s): Macintosh (Computer), Macintosh Toolbox, Programming


What is the meaning of s-l-v-c?

What is the meaning of s-lv-c


What has the author Anthony Porter written?

Anthony Porter has written: 'The best C/C++ tips ever' -- subject(s): C++ (Computer program language), C (Computer program language) 'C++ Programming for Windows' 'C[plus plus] programming for Windows' -- subject(s): C


What has the author Andrew C Staugaard written?

Andrew C. Staugaard has written: 'Structured and object-oriented techniques' -- subject(s): C++ (Computer program language), C 'How to program and interface the 6800' -- subject(s): Motorola 6800 (Microprocessor), Programming 'Structured and object-oriented problem solving using C++' -- subject(s): Accessible book, C++ (Computer program language), Object-oriented programming (Computer science), Structured programming '6809 microcomputer programming & interfacing, with experiments' -- subject(s): Programming, Motorola 6809 (Computer) 'Robotics and AI' -- subject(s): Artificial intelligence, Industrial Robots, Robotics, Robots, Industrial '6809 microprocessor programming' -- subject(s): Laboratory manuals, Motorola 6809 (Computer)


What has the author James C Townsend written?

James C. Townsend has written: 'A programming environment for distributed complex computing' -- subject(s): Computer programming


What has the author Valluru Rao written?

Valluru Rao has written: 'Power programming-- Turbo C++' -- subject(s): C++ (Computer program language), Turbo C++ 'Power programming'


What has the author Mark Walmsley written?

Mark Walmsley has written: 'Programming in Java' 'Graphics programming in C++' -- subject(s): C++ (Computer program language), Computer graphics, Microsoft Windows (Computer file) 'Internet Programming in C++'


What has the author C Michael Holloway written?

C. Michael Holloway has written: 'The syntax of DRAGOON: evaluation and recommendations' -- subject(s): Ada (Programming language) 'A survey of functional programming language principles' -- subject(s): Programming languages (Electronic computers)