Embed presentation
Download to read offline




![F printf, scanf
#include <stdio.h>
main(){
int age;
float height;
char name[30];char name[30];
printf("Please enter your name, age and height: ");
scanf("%s%d%f",&name, &age, &height);
printf("Name: %s is %d years old",name,age);
printf(" and tall %f cms.n",height);
getch();
}
18](https://image.slidesharecdn.com/printfscanf-130802120116-phpapp01/75/Printf-scanf-5-2048.jpg)

printf() and scanf() are functions used for input and output in C programming. printf() is used to output data to the screen or file while scanf() is used to input data from the keyboard or a file. This document provides details on the format specifiers used by printf() and scanf() to handle different data types like integers, floats, characters, and strings. It also provides a code example that uses printf() and scanf() to input a name, age, and height from the user and then output that information.




![F printf, scanf
#include <stdio.h>
main(){
int age;
float height;
char name[30];char name[30];
printf("Please enter your name, age and height: ");
scanf("%s%d%f",&name, &age, &height);
printf("Name: %s is %d years old",name,age);
printf(" and tall %f cms.n",height);
getch();
}
18](https://image.slidesharecdn.com/printfscanf-130802120116-phpapp01/75/Printf-scanf-5-2048.jpg)