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

how much time does it take to learn c language from basic to advance range
3 month and also depend in your skill to learning power...
Nithin
How many programs are in the C language?
Here, we have provided 100+ C programming examples in different categories like basic C Programs, Fibonacci series in C, String, Array, Base Conversion, Pattern Printing, Pointers, etc.
Muskan
0 0
6
What is "&" called in C language?
In the C programming language, the "&" symbol is called the "address-of" operator. It is used to obtain the memory address of a variable. When you use "&" followed by a variable name, it provides...
Soumya
0 0
5
When is a "switch" statement better than multiple "if" statements?
switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type. For instance, rather than the code if (x == 1) printf(“x...
Shalu

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

Ask a Question

Related Lessons

Why Indexing Should Start From Zero In Array ?
Why numbering should start at zero? To denote the subsequence of natural numbers 2, 3, ..., 12 without the pernicious three dots, fourconventions are open to usa) 2 ≤ i < 13b) 1 < i ≤ 12c)...

C Program-Error Handling
//Header files #include<stdio.h>#include<conio.h>#include<stdlib.h> //Main function void main(){ int dividend=10; int divisor=0; int quotient; //Function for clearing screen clrscr(); ...

Structures in C
A structure is a collection of one or more data members possibly of different data types, grouped together under a single name for convenient handling. Defining a Structure: In general terms,...

Internet of Things, Social Media Becoming Part of E-Discovery Landscape
The days when e-discovery consisted of handing over copies of e-mails to address Freedom of Information Act (FOIA) requests, compliance regulations or other legal obligations are over. Now, it's just as...

Some interview questions and answers for fresher level on Pointers
What is a void pointer? Void pointer is a special type of pointer which can reference or point to any data type. This is why it is also called as Generic Pointer. As a void pointer can point to...

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