char x= name; print("%c",x) showing syntax error what is the wrong i have followed all syntax rules it is c language kindly answ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

char x= name; print("%c",x) showing syntax error what is the wrong i have followed all syntax rules it is c language kindly answ

15th May 2021, 3:09 PM
P Mani Kanta
P Mani Kanta - avatar
3 Answers
+ 1
%c format specifier is used to print single character
15th May 2021, 3:12 PM
siddardha Annapureddy
siddardha Annapureddy - avatar
+ 1
char data type accepts either a single character within a single quote or an ascii value. //this is for string char *x = "Mani"; printf("%s", x);
15th May 2021, 3:21 PM
Rohit
+ 1
Thank u so much
15th May 2021, 3:23 PM
P Mani Kanta
P Mani Kanta - avatar