String in C Basic

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

int main()

{
int num;
char name[50];
printf("Input a number: ");
scanf("%d", &num);
printf("Input a name: ");
scanf("%s", &name);

printf("This is the number inputted: %d \n", num);


printf("This is the name inputted: %s", name);
return 0;
}

You might also like