What is difference between %d and %i in c?
Answer / Vineet Kumar Verma
In C, %d is used to represent a signed decimal integer, while %i can be used interchangeably with %d for the same purpose. The difference lies in their portability: %i can handle integer types from different systems, while %d might require some platform-specific adjustments.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is scope and lifetime of a variable in c?
Explain the properties of union.
# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }
What is union and structure?
c program to manipulate x=1!+2!+3!+...+n! using recursion
Tell about strtok & strstr functions
2 Answers HCL, iFlex, Motorola,
Explain enumerated types in c language?
What are the types of type specifiers?
Is there any data type in c with variable size?
What is fflush() function?
What do you mean by invalid pointer arithmetic?
What is else if ladder?