Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int n;
char ch;
clrscr();
printf("Enter any Integer Value:");
scanf("%d", &n);
printf("Enter any Character :");
scanf("%c", &ch);
printf("Given Integer is :%d", n);
printf("\nGiven Character is:%c",ch);
getch();
}
Output:
Enter any Integer Value:20
Enter any Character :
Given Integer is :20
Given Character is:
Next Topic : fflush or flushall function
Previous Topic : scanf to read the data of int, chat, float and double
No comments:
Post a Comment