In final output how %d is replaced by the second argument? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

In final output how %d is replaced by the second argument?

25th Sep 2018, 5:05 AM
Ashi Kumari
Ashi Kumari - avatar
8 Answers
25th Sep 2018, 5:56 AM
Manual
Manual - avatar
+ 3
Ashi Kumari Did you look at the code? I even added a prototype in the comments.
25th Sep 2018, 6:03 AM
Manual
Manual - avatar
+ 2
Ashi Kumari You should try using a char array if you do not want to use formating. also %d does not work for characters. Try %c
25th Sep 2018, 6:10 AM
Manual
Manual - avatar
+ 1
Please mention 2 arguments in 1 program and then elaborate
25th Sep 2018, 5:59 AM
Ashi Kumari
Ashi Kumari - avatar
+ 1
#include <stdio.h> int main() { printf("int: %d \n", sizeof(int)); printf("float: %d \n", sizeof(float)); printf("double: %d \n", sizeof(double)); printf("char: %d \n", sizeof(char)); return 0; }
25th Sep 2018, 6:05 AM
Ashi Kumari
Ashi Kumari - avatar
+ 1
i want a code like this where the %d could be replaced by the second argument
25th Sep 2018, 6:05 AM
Ashi Kumari
Ashi Kumari - avatar
+ 1
I couldn't understand ur point of view
25th Sep 2018, 6:05 AM
Ashi Kumari
Ashi Kumari - avatar
+ 1
alright thanks
25th Sep 2018, 6:11 AM
Ashi Kumari
Ashi Kumari - avatar