Subscribe Us

header ads

FORMAT SPECIFIERS AND ESCAPE SEQUENCES IN C



FORMAT SPECIFIRES AND ESCAPE SEQUENCES IN C PROGRAMMING 

format specifires and escape sequence in C

We are here with a new post of C programming here you have absorb the information as you want.

 Welcome guys to the todays lecture 



In the last lecture we have learned about Operators in C. Today we are going to the learn about format specifiers and Escape Sequences in C.

format specifiers 

for input in c we use the function scanf for taking input. In this process we use format specifier as %d for integer datatypes. Which is also used in the printf function for printing the value.

this %d is called as format specifier of int datatype.

this is the list of format specifiers 


escape sequences

These are the characters used for the make the output easy. If we don't use the escape sequence then our our output will be like lot of irritation. 

for example we have used here \n escape sequence for executing the output in the next line.  

Before using the escape sequence 



output 

Now we will use the escape sequence 

Using the escape sequence 

output 

I hope you will understand this chapter If you will try the different programs using the format specifiers and escape sequence then you can easily use format specifiers and escape sequence.


EXERSISE 

Now write a prgram 

  • use tab escape sequence in the c program 
  • print the float value using the format specifier of datatype float. 


Okay Guys we can stop now, and we will see at the next time. 

THANK YOU 


Post a Comment

0 Comments