Skip to main content

Format Specifying in C

 



Data Types
Format Specify
Char
%c  or %s
Int
%d or %i
Float
%f



Using of Variable
# include <stdio.h>
void main()
{
int a = 5, b = 7;
int c = a+b+3;
printf (“C= %d”, c);
}
# include <stdio.h>
void main()
{
int a = 5, b = 7;
printf (“SUM= %d”, a+b);
}
# include <stdio.h>
void main()
{
char a1 = ‘s’, a2 = ‘g’;
printf (“%s%c%s%s”,a1,a2,a2,a1);
}
O/p: C = 15
O/p: C = 15
O/p: sggs

Comments

  1. Modern lasers might be efficient on slicing gentle to medium gauges of aluminum. Because aluminum is able to|is prepared to} more readily absorb warmth compared to with} metal an industrial laser would require a large amount of|a considerable quantity of} power to soften the aluminum to allow the gas to blow via. This is possible with fashionable tools and slicing 1/2” thick aluminum Bike Helmets for Kids plate is possible. A common throatless shear identified for considered one of its major manufacturers, Beverly, are common to small sheet metal outlets because of their versatility and reliability.

    ReplyDelete

Post a Comment

Popular posts from this blog

Comments in C

  Comment is the code which is not executable means compiler will not compile the comments and that’s why comments are not visible on output screen. Two types of Commenting: Type 1:  double slash ‘ // ’ method the whole statement after double slash is not executed by compiler Example: try to run below code its output will be blank screen #include <stdio.h> void main(){ // printf (“Hello World!”); } #include<stdio.h> void main ( ){ //Comments // Comment printf (“Hello World!”);//abc } #include<stdio.h> //Comments void main(){ //Comments printf(“Hello World”); } o/p:  blank screen O/p:  Hello World! O/p:  Hello World In this way you can give multiple comments anywhere in the program but double slash is used to  comment only single line for commenting multiple lines use type 2.  Type 2:  For multiline commenting or for commenting a whole paragraph from the program we have  to add /* at the start of comment and */ at the end of comment as shown in examples: #include <s

New trends and advantages of C language.

1. You can program the ROBOTS and  Automatic Running Machines  using C language. click here for more information.  2. For building more advanced  software or  Games you need to  learn more advanced languages like  Visual  Basic,  .NET, JAVA, ANDROID programming which is based on C.  3. To build a website you need only HTML and you can make your own website but for making it more advance you need to learn more web designing languages like CSS, JavaScript, Ajax, PHP and this all languages are very easy to learn if you have some basic knowledge about C. 4. After learning C you will be able to make your own software like Calculator, Games, Embedded Softwares, Compilers.