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

Why is the C language important?
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 is widely used for developing...
Ganesh
0 0
5
What are the functions in C programming?
In C programming, functions are blocks of code that perform a specific task. They allow you to break down your program into smaller, reusable pieces, making your code more modular and easier to understand....
Advm
0 0
5
Which is the best book for understanding concepts of c language?
There are several good books for learning C programming. Here are a few highly recommended ones: "C Programming Absolute Beginner's Guide" by Perry and Miller: A great choice for absolute beginners,...
Chetana
0 0
7
Difference between "C structure" and "C++ structure".
C is process oriented programming.. so c follows procedure in execution where as C++ is object oriented and messages are been passes between the objects..
Khushboo
Which is the best C language IDE/compiler for Windows?
Let us now check out some of the famous and best-working IDEs available. Visual Studio Code. Visual Studio Code is one of the most popular IDEs and is open-source software developed by Microsoft....
Deepashri
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

Dynamic Memory Allocation in C using malloc()
#include <stdio.h>#include <conio.h>//#include <malloc.h> OR#include <stdlib.h>void main(){ int *ptr, i, n, sum = 0; printf("how many elements ? "); scanf("%d", &n);...

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...

Pointers and References
Are reference and pointers same? No. I have seen this confusion crumbling up among the student from the first day. So better clear out this confusion at thevery beginning. Pointers and reference...

Tips of learning Java Language/Other Programming Languages
1.You should know the basic concept: If we talk about programming languages so basic concept are same in all the high level languages. So you should know the basic concept firstly then you can easily understand...
I

ICreative Solution

0 0
0

Can we store different data types in a stack?
Yesterday, one of my Facebook friend asked me this question. My answer is "yes", and in this post I will discuss how could we do this.I am a great supporter of working with unions and I will be using union...

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