0

what is wrong with this code?c++ basic char concept

#include <stdio.h> int main() { char s='c'; printf("%c",&s); return 0; } and why these tags get any position like i have write wrong output giving but after posting it it become output wrong giving?

12th Jun 2018, 2:27 AM
Bahubali
Bahubali - avatar
3 Answers
+ 7
printf statement should be: printf("%c", s); & is used while taking input using scanf.
12th Jun 2018, 2:49 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 1
thanks
12th Jun 2018, 2:51 AM
Bahubali
Bahubali - avatar
0
confusing
14th Sep 2018, 8:55 AM
Disu Opemipo Oluwatobiloba
Disu Opemipo Oluwatobiloba - avatar