We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int a;
scanf("%d",&a);
printf("%d\n",a);
long b;
scanf("%ld",&b);
printf("%ld\n",b);
char c;
scanf(" %c", &c); // here in scanf of char we have to get a space
//" %c" in the charecter format specifier because
//then it consumes any leading whitespace in the //program
printf("%c\n",c);
float d;
scanf("%f",&d);
printf("%f\n",d);
double e;
scanf("%lf",&e);
printf("%lf\n",e);
return 0;
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Basic Data Types
You are viewing a single comment's thread. Return to all comments →
int main() {
}