0

I am getting error unidentified symbol _printf in module

#include<stdio.h> void main() { int a,b,c=11; char d,e,f='a'; float g,h,i=2.0; double j,k,l=3.0; a=12; d='a'; g=4.0; j=5.0; printf("Enter a value of an integer:"); scanf("%d",&b); printf("Enter character value:"); scanf("%c",&e); printf("Enter value of a float:"); scanf("%f",&h); printf("Enter a value of double:"); scanf("%lf",&k); prinf("Values of integer are %d %d %d\n",a,b,c); printf("Values of characters are %c %c %c\n",d,e,f); printf("Values of float are %f %f %f\n",g,h,i); printf("Values of doubles are %lf %lf %lf\n",j,k,l); }

16th Aug 2018, 6:51 PM
Samadhan Patil
Samadhan Patil - avatar
4 Answers
0
Samadhan Patil it's typo... you have used prinf instead of printf on line having a,b and c. additionally, don't use scanf in c++... you should have cout and cin in c++..
16th Aug 2018, 7:19 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
Thanks for you help
16th Aug 2018, 7:39 PM
Samadhan Patil
Samadhan Patil - avatar
0
oh sorry the program is in C not in C++
16th Aug 2018, 7:32 PM
Samadhan Patil
Samadhan Patil - avatar
0
in c, I am able to compile with one change I mentioned
16th Aug 2018, 7:33 PM
Ketan Lalcheta
Ketan Lalcheta - avatar