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.
Can anybody figureout what is the wrong with below code
// Declare second integer, double, and String variables.
int ii;
double dd;
char ss[80];
char newStr[200];
// Read and save an integer, double, and String to your variables.
scanf("%d\n %lf\n %[^EOF]s\n", &ii, &dd, ss);
// Print the sum of both integer variables on a new line.
printf("%d\n", i+ii);
// Print the sum of the double variables on a new line.
printf("%.1f\n", d+dd);
// Concatenate and print the String variables on a new line
// The 's' variable above should be printed first.
strcat(newStr, s);
strcat(newStr, ss);
puts(newStr);
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Data Types
You are viewing a single comment's thread. Return to all comments →
Can anybody figureout what is the wrong with below code
// Declare second integer, double, and String variables.