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

What is the fee for learning C Language?
In C lang course ,there is not only basics it also having whole package to complete the task and course.cost may be it's depends upon the institute n teaching level
Sk.
Is it necessary to mention the header files in the C programming language?
yaa !!!!! it is necessary because we need the data present in evey header file...like example we can do mathematical calculations with the help of math header file.
Hari
If I want to learn Java, is it necessary to know about C language?
Obviously it is not necessary, though both languages share a lot of similar syntax. If you know any other language then you will probably get advantage to learn Java. If not, then also its fine. You can start a fresh with Java.
Nitesh
0 0
7
How do I become good in competitive programming in a year if I have just started learning C language?
The best topics to learn would be Data structures and also the analysis of algorithms..(THESE ARE BASICS BUT IF U LEARN THEM PROPERLY!!! CODING WOULD BE A PIECE OF CAKE FOR U....)
Anmol
0 0
9

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

Ask a Question

Related Lessons

Pro learners tip for C language
First get the concept of algorithm before heading to write your first program.

Datatypes in C Language
Data types in C Language Data types specify how we enter data into our programs and what type of data we enter. C language has some predefined set of data types to handle various kinds of data that...

Storage classes in c
Storage classes determine the scope and life time of a variable. Scope is defined as the region over which the defined variable is accessible. Lifetime is the time during which the value of a variable...

Why C is a Language and not a database?
When I interviewed a candidate, I raised this question many times, but I have not got the answer correctly. To under why C is a language and not a database, it is good to understand why our communication...

Tress And Its Traversal
Depth First Traversals:(a) Inorder (Left, Root, Right) : 4 2 5 1 3(b) Preorder (Root, Left, Right) : 1 2 4 5 3(c) Postorder (Left, Right, Root) : 4 5 2 3 1 Trees are one of the data structures like...

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