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 to calculate address of n dimensional matrix
An n dimensional matrix can be of any dimension. Adding a dimension is adding one more index number (to access the element). In 1-D array you the elements are linearly arranged and can be addressed as...
Rupendra
any one can teach me c++
Yes of course i can give you online classes
Bhuvanesh
What is the difference between a string and an array?
An array is an array of anything. A string is a specific kind of an array with a well-known convention to determine its length. There are two kinds of programming languages: those in which a string is...
Rakes
Why do we still use C language?
What is the C Language? The C language is a high-level, general-purpose programming language. It provides a straightforward, consistent, powerful interface for programming systems. That's why the C language...
Aditi
0 0
5

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

Ask a Question

Related Lessons

How to write shared library program using C Programming?
Library Name : hellofilename : hello.c#include void Hello(){ printf("Hello World .. How are you 1\n");}======================================Header File:hello.h#ifndef __HELLO_H#define __HELLO_Hvoid Hello(void);#endif===============================Application...

Facts about C language
C programming language was developed in 1972 by Dennis Ritchie at AT&T Bell Labs. It was developed to overcome the problems of languages such as B, BPCL. It was developed to write the Unix operating...

Operators in C
Operators in C Operator: An operator is a symbol that tells the compiler to perform certain mathematical or logical calculations. Operators are used in programs to manipulate data and variables. The...

10 Tips to improve your learning
1. Have a quick revision of topics that you have read in past three days before you start studying a new topic. 2. Make your own notes containing the summary of the topic. 3. Allot proper timing for...

C Program-Error Handling[Program Exit Status]
//Header files #include<stdio.h>#include<conio.h>#include<stdlib.h> //Main Function void main(){ int dividend=20; int divisor=5; int quotient; //Function for clearing screen clrscr();...

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