how does printf function work



how does printf function work..

Answer / vignesh1988i

1)printf() is a built in library function which is defined
in <stdio.h> header file...
2) in printf(); function we can pass
1) entire string within "...." like :
eg: printf("my name is vignesh");

2) string with list of variables like :
eg: printf("%d%d" , i,j);
| |
first second
argument argument

3) like every function returns a value , PRINTF returns the
no. of characters which is inside "...".
eg: printf("%d",printf("hai how are u?"));
the output will be 14.....

4) printf() function is having direct contact with VDU
(video display unit) in the system..... so only it is
displayin every thing in the screen...........

thank u

Is This Answer Correct ?    7 Yes 4 No

Post New Answer

More C Interview Questions

Can include files be nested?

0 Answers  


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

0 Answers  


array of pointer pointer to array pointer to pointer

1 Answers   MAHINDRA,


WHAT IS RTGS N MINIMUM AMT TO B TRANSFERD N WHAT R THE CHARGES ON MINIMUM AMT N IN WHICH BANK WE CAN DO IT?

1 Answers  


WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }

25 Answers  


What is structure padding in c?

0 Answers  


how can write all 1to 100 prime numbers using for loop,if and break ?

2 Answers   TCS,


Can you explain the four storage classes in C?

0 Answers   TCS,


where does malloc() function get the memory?

1 Answers  


What are variables c?

0 Answers  


Write a program to swap two numbers without using a temporary variable?

0 Answers   Infosys,


Is flag a keyword in c?

0 Answers  


Categories