Chapter - 4
Chapter - 4
Chapter – 4
Output:
1. printf()
Processed Data/
Information/ Result
printf("Using getchar()\n");
printf("-------------------\n\n");
printf("Enter the value of a=>");
a=getchar();
printf("\n");
printf("Value of a is=>");
putchar(a);
printf("\n\n\n");
printf("Using scanf()\n");
printf("-------------------\n\n");
printf("Enter the value of b=>");
scanf("%c",&b);
printf("\n");
printf("Value of b is=>%c",b);
getch();
}
printf("Using getchar()\n");
printf("-------------------\n\n");
printf("Enter the value of a=>");
a=getchar();
printf("\n");
printf("Value of a is=>");
putchar(a);
printf("\n\n\n");
printf("Using scanf()\n");
printf("-------------------\n\n");
printf("Enter the value of b=>");
scanf("%d",&b);
printf("\n");
printf("Value of b is=>%d",b);
getch();
}
getch();
}