icon
icon
icon
Leave a message
twitterfacebookgoogle plusrss feedemail

C Program For printf() Function


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



Kindly Share This Post »»

Author Box by ENGINEER's TIPS

About the Author

I am Arpan Paramanik From India and i am the founder of the blog ENGINEER's TIPS.I Very Much interest in blogging by reading articles online. Mine thirst for learning latest web technologies like HTML, CSS, C, C++ and JavaScript equipped me with an art of web designing. I am now a good designer…’

0 comments:

Post a Comment

 

Wikipedia Search

Search results

Total Pageviews

38364

Recent Comments

If you are facing any problem in this site, or any link is not working then please

Contact us

Name

Email *

Message *

 
To Top To Bottom Auto Scroll Stop Scroll