Checking printf() function is the general program in C Language.
Just copy the bellow code and paste it to your TurboC software. And then run the program. You can download the TurboC software.
Source Code...
#include <stdio.h>
#include <conio.h>
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
char ch= 'E';
char str[50]= "www.4uengineer.blogspot.com";
float fl= 77.25;
int n= 77;
double dbl = 77.123456;
printf("Character is: %c \n", ch); /*Example of printf() function*/
printf("String is: %s \n" , str);
printf("Float value is: %f \n", fl);
printf("Integer value is: %d\n" , n);
printf("Double value is: %lf \n", dbl);
printf("Octal value is: %o \n", n);
printf("Hexadecimal value is: %x \n", n);
getch();
}
Output...
Character is: E
String is: www.4uengineer.blogspot.com
Float value is: 77.25000
Integer value is: 77
Double value is: 77.123456
Octal value is: 115
Hexadecimal value is: 4d
0 comments:
Post a Comment