UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is the output of the below: printf("%d", printf("Hello"));

Asked by Last Modified  

Follow 10
Answer

Please enter your answer

"8 years experienced tutor (C, C++, Mathematics, Computer science)" by passion & "CCNA certified Python developer on Cisco network security platforms" by profession. Good with C, C++, Python, PyATS, Core Java, Networking, Linux, MCSE.

The output would be as follows: Hello5 Reason: 'printf( )' not only prints a given strings, but it also returns a number which is the count of the number of characters that it has successfully printed on the screen. And the direction of execution in 'printf( )' is from Right side to Left side....
read more
The output would be as follows: Hello5 Reason: 'printf( )' not only prints a given strings, but it also returns a number which is the count of the number of characters that it has successfully printed on the screen. And the direction of execution in 'printf( )' is from Right side to Left side. So, at first the inner 'printf( )' would be executed and the string "Hello" would be printed on the screen. After printing "Hello", the inner 'printf( )' returns 5 to the outer 'printf( )'. 5 is nothing but the number of characters ("Hello") printed on the screen. And this 5 would be printed next to the string "Hello" by the outer 'printf( )'. Hope you understand. You are welcome to shoot more queries. read less
2 Comments

Tutor

Error will come .printf is keyword in C , these are reserved. your are try to re declare definition that's wrong.
2 Comments

Experienced IT Professional with 5 years of experience in Tutoring Programming subjects

printf prints the value on the standard output i.e. at stdout. And it returns the number of characters successfully printed on the output screen. We have 2 printf. one is printing string "Hello" and other is printing the return value of the code printf("Hello"). First printf("Hello") will be called...
read more
printf prints the value on the standard output i.e. at stdout. And it returns the number of characters successfully printed on the output screen. We have 2 printf. one is printing string "Hello" and other is printing the return value of the code printf("Hello"). First printf("Hello") will be called and will print the string "Hello" on the screen and then 5 will be printed as 5 charcters are successfully got printed on the output screen. So output will be: Hello5 read less
Comments

Tutor

Printf takes multiple arguments and these functions are called variable length arguments function or vararg function. User supply a string and input arguments. Printf creates an internal buffer for constructing output string. Now printf iterates through each characters of user string and copies the character...
read more
Printf takes multiple arguments and these functions are called variable length arguments function or vararg function. User supply a string and input arguments. Printf creates an internal buffer for constructing output string. Now printf iterates through each characters of user string and copies the character to the output string. Printf only stops at "%". "%" means there is an argument to convert. Arguments are in the form of char, int, long, float, double or string. It converts it to string and appends to output buffer. If the argument is string then it does a string copy. Finally printf may reach at the end of user sting and it copies the entire buffer to the stdout file. read less
Comments

Tutor

Printf akes multiple arguments and these functions are called variable length arguments function or vararg function. User supply a string and input argumnets. Printf creates an internal buffer for constructing output string. Now printf iterates through each characters of user string and copies the character...
read more
Printf akes multiple arguments and these functions are called variable length arguments function or vararg function. User supply a string and input argumnets. Printf creates an internal buffer for constructing output string. Now printf iterates through each characters of user string and copies the character to the output string. Printf only stops at "%". "%" means there is an argument to convert. Arguments are in the form of char, int, long, float, double or string. It converts it to string and appends to output buffer. If the argument is string then it does a string copy. Finally printf may reach at the end of user sting and it copies the entire buffer to the stdout file. read less
Comments

IT Professional Trainer with 12+ years of experience in IT Industry(Mobile TechLead, iOS, Android)

Hello5
Comments

Web Development With Java

Hello5
Comments

Trainer for sumone who needs it

Hello5
Comments

C coder

the output would contain the number of characters in the string. output will be Hello5 printf("%d",(printf("hello123"))); output will be hello1238 as there are 8 characters in string.
Comments

Trainer

Hello5
Comments

View 58 more Answers

Related Questions

The object file is in binary code, and the machine understands the binary language. So why object files are not executed?
Object files are sources compiled into binary machine language, but they do not have library files, so they are not executed.
Dhruvil
0 0
9
How can I make my C programming basics strong?
Practise more programs on each and every topic of C.
Mohit
0 0
5
Why does execution of a program in C/C++/Java start from only main?
Main function is calling the other functions of he program and compiler gets this direction while Compiling the code. If it does not find main function then it will also not find the other functions in the code. So, main is required in C program.
Isha
What is the most efficient way to store flag values?
A flag is a value used to make a decision between two or more options in the execution of a program. Efficiency in this case is a tradeoff between size and speed. The most memory-space efficient way to...
Deepak
0 0
6
What are the flaws of the C programming language?
C programming language does not support Object-oriented programming language
Sounak
0 0
7

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Bit wise operators in C
Bit Wise Operators Bit Wise operators are manipulates of individual bits with in a word of memory. The bit wise operators can be divided in to three general category. One’s Complement...

4 Things Every Tech Startup Needs to Know About The Coaching Industry
Knowledge on any subject is widely available to those who wish to learn. However, just gathering knowledge from other people doesn’t guarantee results in business. Results come from applying what...

Recursion in C Programming
The process of calling a function by itself is called recursion and the function which calls itself is called recursive function. Syntax of Recursive Function returntype recursive_func () { statements; ...
R

Ravindra Yadav

2 0
0

What is a Programming Language
What is a Language? Language is a communication system of human. What is a programming Language? A programming Language is a formal constructed language design to communicate...

Design your own Mouse Driver in C Language
Mouse Driver (msdrv.h) #include #include union REGS i,o; restrictmouseptr(int x1, int y1, int x2, int y2) { i.x.ax=7; i.x.cx=x1; i.x.dx=x2; ...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more