same question was asked in my internship interview
@Socialmedia......Addiction
9 ай бұрын
Toh answer kya Diya tha?
@rajshiromani727
9 ай бұрын
Tb bhi ans ni pta bhai?? Ans is Hello5😅
@TarunSharma-eq3fg
9 ай бұрын
@@rajshiromani727 but bhai return 0 ka mtlb to yeh nhi hota ki no. of characters 0 hi print krna (I am new in c language 😅)
@gulhusain6015
9 ай бұрын
@@TarunSharma-eq3fgare wo main function ka return type h int main() function hai n isliye return 0 likh rhe Agar void main() likhte to koi value return nhi krani pdti
@TarunSharma-eq3fg
9 ай бұрын
@@gulhusain6015 oh thanks 😅
@shubh_m19 ай бұрын
Please keep posting videos like this.
@Sam_sh02
9 ай бұрын
@@nishagwaliya476???
@rudragajjar4549 ай бұрын
output is: 'Hello 5' since the printf("Hello"); statement will also be executed
@rajshaikh3448
9 ай бұрын
Bhai bilkul sahi bola
@sky333suraj
9 ай бұрын
The format specifier %d just prints integer.
@rudragajjar454
9 ай бұрын
@@sky333suraj yes but the 1st line of code is an assignment statement which are executed from right to left. So the RHS of the assignment which is the command printf("Hello"); is executed first and then it's return value i.e 5 is assigned to variable x
@mohammedarifofficial
8 ай бұрын
I think "hello 5" is the real answer;
@hammer455
8 ай бұрын
No answer is Hello5 no space between them ..
@rounakverma81156 ай бұрын
This is most common question among all the interviewers, thanku mammm!
@thesniperxd5302Ай бұрын
It's nice to see that not only the first printf function prints the hello string but it also returns a value to complete the int x = code which the next printf function prints as 5 ❤
@harshahm01309 ай бұрын
Actually Output is Hello5 because basically printf primarily does its work of printing the text and count the number characters which stores in x
@ratnajaiswal169
9 ай бұрын
Is there any way to print only number of characters not the original word in printf ??
@K15H4N
9 ай бұрын
@@ratnajaiswal169space Instead of word.
@iTsRko_
4 ай бұрын
Hello 5
@kratika83186
18 күн бұрын
@@ratnajaiswal169 yes indeed , use int x = strlen(“Hello”); and define library function #include
@wildyoutuber2615
15 күн бұрын
what is x not output
@peak_9119 ай бұрын
I think this concept of interview qs type videos is very helpful, can you guys make a playlist for interview qs shorts?
@mubashiriqbal76569 ай бұрын
Keep posting this type of question and also aptitude questions also...🙏
@ReactiverahulАй бұрын
In python Output Hello None
@sanatani-aatma6 ай бұрын
Samjh to nahi aaya but sunke acha laga 😂😂😂
@bavyagastya2149
5 ай бұрын
No. Of character bhai printf function me Hello likha hai there is 5 characters in Hello to screen par output 5 aayega simple
@SwingMotor
4 ай бұрын
Sanatani ko kab se samaz nhi aa rha ha 😅😅
@anuj-13
3 ай бұрын
😂😊
@AlhamdulillahW
3 ай бұрын
@@SwingMotor 😂😂😂
@Shrutiyadav_108
2 ай бұрын
@@SwingMotor Jo samjha rahi hai vah bhi sanatani hi hai
@anshu20059 ай бұрын
Hey I am here to thank universe . The universe helped me in getting a seat in Delhi University. Four rounds had gone and I was with no seat. So I prayed to universe , trusted him , posted letters to him and finally he helped me. I am so thankful to universe.
@ankitmishra697
8 ай бұрын
🙄 Wow bro... ❤
@sohamghosh5339 ай бұрын
Output is "Hello5" not just 5 as it will also execute printf("Hello")
@hitendrachakrawarti5821
9 ай бұрын
Yes bro it will excute Hello5
@user-zm6nk5mw9i
9 ай бұрын
No
@nonwestern_outofslavery
9 ай бұрын
me too
@Ankitkumar-pn2lv
9 ай бұрын
Yes hello5
@CHAUDHARY_PRAYAS
9 ай бұрын
Bhai you are right but she asked what will be printed in place of x not complete o/p
@NayanW59 ай бұрын
Wow! Each day you learn something new...
@rishabshukla50779 ай бұрын
We need more like this
@introvertsenpai99689 ай бұрын
Thank you ma'am, I thought I was good at C language but this was something new for me 😊
@sahilmane85518 ай бұрын
Some people are saying that the answer is Hello5 but the question is not that what is the output, but it is that what is x and the value of x is 5, not hello5.
@siddheshnarwade3647Ай бұрын
As a 12 th std student i m happy to ans the question correctly 😅❤
@pavitrakumarsahu25229 ай бұрын
Didi aapne c language ko bahut achhe se detail se padhaya hai aise aap c plus plus ka padha do n. Hum aap se padhna chahte hai c plus plus. Aapke padhane ka tarika bahut achha hai achhe se samjh me aata hai.
@pavitrakumarsahu2522
9 ай бұрын
Please c plus plus ka bhi padha do
@technoprogramming4753Ай бұрын
5 because printed function returns lengthy of a string
@akashsonar63329 ай бұрын
These small things make big difference in interview..
@sanket78779 ай бұрын
didi pls aisehi minute concepts which student ignore during interviews , aur laiye. It will be very helpful
@MaaRiGAMINGOP9 ай бұрын
First line will give output Hello and assign value to x then second line print 5 combine will be Hello5
@mansuralikhanpathan40779 ай бұрын
This video is very useful to meeru 🥳🥳. I hope to find more questions in it, not only in the C language but also in other programming languages for Interview a🙏🏻🙏🏻.
@rohansapate38909 ай бұрын
We want more such shorts on C and Java.
@user-he7pc4ty1uАй бұрын
Aise hi logic question banate raho mam 😊
@sayuri_209 ай бұрын
Sis, You really motivate me to study every time I see you. I like You already.
@Memer091576 ай бұрын
Let me explain that x: 5 and output : Hello5 Because In c, compiler execute first printf function then it return 5, Hello will print on execution. Then 5 will get assign to x, then last printf function print 5. As there is not any space or new line, it will print as Hello5. Printf function return the no. Of char
@user-on7mj6bd8p4 ай бұрын
Thank you! I have learned from this video. ❤
@purveshmahendrakar21109 ай бұрын
Make a full length video of understanding this type of concepts
@zoyasaiyyad65799 ай бұрын
Good question ❤
@jayrawat39299 ай бұрын
Meaningful❤
@kunalmahurkar271il9 ай бұрын
Didi @ApnaCollegeOfficial Correct answer is **Hello 5** Because of %d is used length of *hello* also print.
@shriyanshu_9k
9 ай бұрын
Yss
@Hbjbsisbehsbsj
2 ай бұрын
Without space
@advaitgadekar6771
2 ай бұрын
But int return only integer walue how hello can home?
@QuanAffinity
20 күн бұрын
Hello5 not Hello 5 no spaces
@suvammagar5287Ай бұрын
output is "hello5" but X is equals to 5
@rohityadavmudra9 ай бұрын
IT IS HELPFUL, MAJE MORE SUCH VIDEO'S LIKE THIS ✅♥️🙏
@TonyStark-zl3ms9 ай бұрын
Thank you mam...keep uploading these types of questions...it enhances our knowledge and help us to clear the interview ❤❤😊
@meetparmar21079 ай бұрын
Int x=(printf("hello world") , 18); Was asked in iit kgp mid sem exam.
@Jayadev-qs4jk
8 ай бұрын
i guess that comma is of no use there
@sebastian18059
5 ай бұрын
Same cheez hai, hello world hi print hoga
@anurag-bh2ug5 ай бұрын
We want more videos like this😊
@khazeemakanwal72138 ай бұрын
We want more this type of questions n this answer Thank u didi
@amritanshpandeyАй бұрын
Awesome
@AryanJC078 ай бұрын
Yup its simple thanks for sharing ❤
@Sattari_012 ай бұрын
Yr kitni piyri h y...AGR issy hi coding sekhi hoti to aj m programer hota😊
@ayushthaware3449 ай бұрын
Hello5 is correct Output The Print statement hello will also be printed, talking about next statement, the length of HELLO that is 5 is printed after that without any space
@mr.healthbeat51738 ай бұрын
I predicted it right in those 3 sec.
@fantastic_nisha9 ай бұрын
please more videos like this ❤
@learningfiru4 ай бұрын
hey mam ; may the R8 answer will be "hello5"
@advaitgadekar6771
2 ай бұрын
But int return only integer walue how hello can home?
@tgayush14249 ай бұрын
Bring more videos like this, or make a large video like this , this types of questions come in OA , and the prefix and postfix thing also common...
@mrpaulcreations21729 ай бұрын
5 , print function returns the length of the printed string
@AyoubTahlilHersiАй бұрын
Int is an integer and not a character so only the number 5 will be printed as opposed to being an array of characters [ ] such as hello which is 5 characters. so printf function of hello will be printed and then the number of characters in number "5"
@VirenderJi-gs2qs
Ай бұрын
Indeed
@Rama_Siva9 ай бұрын
I run this program/code answer aya - hello5.🤔
@Rama_Siva
6 ай бұрын
@@vivekdhamande8350 bro character nahi hai eiaha.😂
@sarwanray12
6 ай бұрын
Ha bhai answer hello5 hi ayega isme x ka value kya print hoga questions ye hai uska answer hai 5
@superbikelover019 ай бұрын
In this question answer is "HELLO 5" BECAUSE value of int x is how many alphabet in Hello and hello is also print
@shikharpahade3959
9 ай бұрын
Data type is int , so only integer value will be printed
@kanhagarg1525
9 ай бұрын
Hello5 without space
@DarkMysterioGaming
9 ай бұрын
@@shikharpahade3959no bro
@superbikelover01
9 ай бұрын
@@kanhagarg1525 yes but I mention in this comments for understanding "HELLO5" THIS IS REAL OUTPUT
@shriyanshu_9k
9 ай бұрын
@@shikharpahade3959bhai practical krke check krle....hello5 print ho rha h
@hamzahashmiofficial9 ай бұрын
Intelligent
@AkashSupkar-io9upАй бұрын
'X'usiko kahata ha jo hame chor ka chali jati ha 😢😅
@sagaryadu9769 ай бұрын
Also it is return blank space and integer value ..
@ramjiyadav51474 ай бұрын
Outstanding shradhha ji
@lokeshhemane21539 ай бұрын
great pls post like this videos..
@divine38329 ай бұрын
Those who are saying it prints Hello5, try running only int x= printf("Hello"); It will give 'Hello' as output, and if you write the complete code, it will print 'Hello5', meaning, 5 is the answer that x is returning
@OFCnaman
9 ай бұрын
Is shows error , bro int x sirf integer leta hai to int x ko ham print hello ko kaise print kr skte
@president-0-0-75 ай бұрын
awesome 👍
@muhammad_saad_0072 күн бұрын
Hello5 not just 5 because we are printing the string too
@killxsad9 ай бұрын
for the people in the comments saying it will print hello5, the question in the video is: "what is x?", which mean what comes in place of x and the answer is '5'. The complete output will be 'Hello5'.
@SidsAnalysis6 ай бұрын
Jo printable cheeje hongi unka count number print hoga Jaise isme Hello ye sare printable hain Isiliye iska answer 5 aayega However isme \0 null character bhi hai but vo printable nhi hai isiliye vo is count me nhi add hoga
@Aarya_x129 ай бұрын
OUTPUT (Hello5) aa rha h
@ankitkumar-qi3cd
4 ай бұрын
correct bro, qki phle first wala printf apna Hello print krega, phir baad me next wala printf X ki value print krega :-) then output aayega Hello5
@AslamNazeerShaikhАй бұрын
Its programming language specific question.. they questions are good for freshers and not for experienced developers.. 😂 these days people are asking inbuilt function's functionalities outcome
@princepexz9 ай бұрын
Intresting
@garimadixit46349 ай бұрын
Best question 🎉🎉
@kishoraryal6632 ай бұрын
Impressed
@jarvis92635 ай бұрын
#include int main() { // Write C code here int x = printf("Hello "); printf("%d ",x); return 0; } output ---> Hello 6
@Abhishek-qw2mf9 ай бұрын
Phli bar koi sahi jawab mene dia hai apka 😂❤
@TIMEZEDFF9 ай бұрын
My future dream world Best hacker banung ❤❤❤😊😊
@VishalSingh-nn4ne6 ай бұрын
%d indicates the integer value thats why 5 will be print
@onetofun9 ай бұрын
We want more like this...😇✨
@Lets_coding184 ай бұрын
THanks didiiii😍✨
@madhukantsingh_MSI_GROUP5 ай бұрын
Nice voice....😊😊
@ShauryaThareja9 ай бұрын
bht bdia pdate ho aap
@k289999 ай бұрын
keep posting such videos ma'am
@PokeBoy-pe8lr4 ай бұрын
I am a beginner. If c++ is an extended of c ,then why we use “printf” and “cout” to output a statement.
@zimon71826 ай бұрын
Thank you didi❤❤❤
@suvammagar5287Ай бұрын
if we do scanf then it gives the output "hello"
@komalkhatod10429 ай бұрын
Very nice question ❓😊😊😊
@mukherjee.p24 күн бұрын
There's nothing to "think" about this. If you know you know lol. You may not be able to just guess the return value out of a random function (random because you typically wouldn't use it like this) right. Typically in systems languages, they usually return the "number of bytes written" from printing or writing functions. So there's that.
@CaptainCoder19 ай бұрын
Quite simple problem for those who atleast knows the function signature of printf function it return an integer which is equal to number of characters that it has successfully printed in the console screen.
@ratnajaiswal1699 ай бұрын
It prints Hello5... Is there any way to print only number of characters not the original word in printf ??
@user-yy7uw1qx9h8 ай бұрын
X is an variable and it's stored the statement that are *hellow world*.
@MdRakibulhasan-dq5dh8 ай бұрын
yes the x value is 5 .if we get this code output .than we have hello5 output
@Anemptysoul6 ай бұрын
The answer is not only 5 . It's hello5 as printf("hello"); statement will also execute.
@ujjwalchowdhury25518 ай бұрын
Great 👍 great 👏
@StaticTechnology5 ай бұрын
This is not logic test. This is how much memory you have in your mind.
@zimon71826 ай бұрын
Thank you didi
@pritigulhane35425 ай бұрын
Thank you👍😊
@bhavinpancholi34889 ай бұрын
good . impressive
@gaming9876king9 ай бұрын
Thank you
@sahilchopde14509 ай бұрын
Answer is " Hello5" not only 5 I also run the program
@Tbm4545
9 ай бұрын
Bete usne x ka value pucha hai na ki kya print hoga, Wo jo hello print horaha hao wo uper wali print statement ka ans hai aur uske bad x yani ki 5 print horaha hai, aur udhr new line statement nahi use ki hai isliye wo hello5 ek sath print hoarah hai
@luxrayy2041
7 ай бұрын
@@Tbm4545yeahhhh
@Hbjbsisbehsbsj
2 ай бұрын
@@Tbm4545 oh
@mohammadabdullahaalforhad13755 ай бұрын
impressive
@user-dh6gd1wv2t9 ай бұрын
Thank you very much
@Motivationc1257 ай бұрын
Yes my thinking is right
@shubhangiagarkar17083 ай бұрын
Certainly! Here's the corrected code that stores the value returned by `printf` in `x` and returns it: ```c #include int main() { int x = printf("hello"); printf("%d", x); return x; } ``` This code prints the length of the string "hello" followed by its actual length, and then returns the value of `x`. So the output will be: ``` hello5 ``` And the return value of the program will be `5`.
@pkavenger99909 ай бұрын
I am python programmer and i have never touched C but as i see int and then i saw d% and gussed that answer will be in digits atleast instead of string.
@motivationallifevideos17 ай бұрын
😂humne pahle video dekha to socha add hai😅😅😅
@shaikhIsmail-hp9ci3 ай бұрын
Thank you madam
@sagardas9060Ай бұрын
I had my college placement today. They asked this question in the coding exam .
@pintugujjar13349 ай бұрын
Me being a civil engineering student trying to understand the question with the help of answer😅
Пікірлер: 896
same question was asked in my internship interview
@Socialmedia......Addiction
9 ай бұрын
Toh answer kya Diya tha?
@rajshiromani727
9 ай бұрын
Tb bhi ans ni pta bhai?? Ans is Hello5😅
@TarunSharma-eq3fg
9 ай бұрын
@@rajshiromani727 but bhai return 0 ka mtlb to yeh nhi hota ki no. of characters 0 hi print krna (I am new in c language 😅)
@gulhusain6015
9 ай бұрын
@@TarunSharma-eq3fgare wo main function ka return type h int main() function hai n isliye return 0 likh rhe Agar void main() likhte to koi value return nhi krani pdti
@TarunSharma-eq3fg
9 ай бұрын
@@gulhusain6015 oh thanks 😅
Please keep posting videos like this.
@Sam_sh02
9 ай бұрын
@@nishagwaliya476???
output is: 'Hello 5' since the printf("Hello"); statement will also be executed
@rajshaikh3448
9 ай бұрын
Bhai bilkul sahi bola
@sky333suraj
9 ай бұрын
The format specifier %d just prints integer.
@rudragajjar454
9 ай бұрын
@@sky333suraj yes but the 1st line of code is an assignment statement which are executed from right to left. So the RHS of the assignment which is the command printf("Hello"); is executed first and then it's return value i.e 5 is assigned to variable x
@mohammedarifofficial
8 ай бұрын
I think "hello 5" is the real answer;
@hammer455
8 ай бұрын
No answer is Hello5 no space between them ..
This is most common question among all the interviewers, thanku mammm!
It's nice to see that not only the first printf function prints the hello string but it also returns a value to complete the int x = code which the next printf function prints as 5 ❤
Actually Output is Hello5 because basically printf primarily does its work of printing the text and count the number characters which stores in x
@ratnajaiswal169
9 ай бұрын
Is there any way to print only number of characters not the original word in printf ??
@K15H4N
9 ай бұрын
@@ratnajaiswal169space Instead of word.
@iTsRko_
4 ай бұрын
Hello 5
@kratika83186
18 күн бұрын
@@ratnajaiswal169 yes indeed , use int x = strlen(“Hello”); and define library function #include
@wildyoutuber2615
15 күн бұрын
what is x not output
I think this concept of interview qs type videos is very helpful, can you guys make a playlist for interview qs shorts?
Keep posting this type of question and also aptitude questions also...🙏
In python Output Hello None
Samjh to nahi aaya but sunke acha laga 😂😂😂
@bavyagastya2149
5 ай бұрын
No. Of character bhai printf function me Hello likha hai there is 5 characters in Hello to screen par output 5 aayega simple
@SwingMotor
4 ай бұрын
Sanatani ko kab se samaz nhi aa rha ha 😅😅
@anuj-13
3 ай бұрын
😂😊
@AlhamdulillahW
3 ай бұрын
@@SwingMotor 😂😂😂
@Shrutiyadav_108
2 ай бұрын
@@SwingMotor Jo samjha rahi hai vah bhi sanatani hi hai
Hey I am here to thank universe . The universe helped me in getting a seat in Delhi University. Four rounds had gone and I was with no seat. So I prayed to universe , trusted him , posted letters to him and finally he helped me. I am so thankful to universe.
@ankitmishra697
8 ай бұрын
🙄 Wow bro... ❤
Output is "Hello5" not just 5 as it will also execute printf("Hello")
@hitendrachakrawarti5821
9 ай бұрын
Yes bro it will excute Hello5
@user-zm6nk5mw9i
9 ай бұрын
No
@nonwestern_outofslavery
9 ай бұрын
me too
@Ankitkumar-pn2lv
9 ай бұрын
Yes hello5
@CHAUDHARY_PRAYAS
9 ай бұрын
Bhai you are right but she asked what will be printed in place of x not complete o/p
Wow! Each day you learn something new...
We need more like this
Thank you ma'am, I thought I was good at C language but this was something new for me 😊
Some people are saying that the answer is Hello5 but the question is not that what is the output, but it is that what is x and the value of x is 5, not hello5.
As a 12 th std student i m happy to ans the question correctly 😅❤
Didi aapne c language ko bahut achhe se detail se padhaya hai aise aap c plus plus ka padha do n. Hum aap se padhna chahte hai c plus plus. Aapke padhane ka tarika bahut achha hai achhe se samjh me aata hai.
@pavitrakumarsahu2522
9 ай бұрын
Please c plus plus ka bhi padha do
5 because printed function returns lengthy of a string
These small things make big difference in interview..
didi pls aisehi minute concepts which student ignore during interviews , aur laiye. It will be very helpful
First line will give output Hello and assign value to x then second line print 5 combine will be Hello5
This video is very useful to meeru 🥳🥳. I hope to find more questions in it, not only in the C language but also in other programming languages for Interview a🙏🏻🙏🏻.
We want more such shorts on C and Java.
Aise hi logic question banate raho mam 😊
Sis, You really motivate me to study every time I see you. I like You already.
Let me explain that x: 5 and output : Hello5 Because In c, compiler execute first printf function then it return 5, Hello will print on execution. Then 5 will get assign to x, then last printf function print 5. As there is not any space or new line, it will print as Hello5. Printf function return the no. Of char
Thank you! I have learned from this video. ❤
Make a full length video of understanding this type of concepts
Good question ❤
Meaningful❤
Didi @ApnaCollegeOfficial Correct answer is **Hello 5** Because of %d is used length of *hello* also print.
@shriyanshu_9k
9 ай бұрын
Yss
@Hbjbsisbehsbsj
2 ай бұрын
Without space
@advaitgadekar6771
2 ай бұрын
But int return only integer walue how hello can home?
@QuanAffinity
20 күн бұрын
Hello5 not Hello 5 no spaces
output is "hello5" but X is equals to 5
IT IS HELPFUL, MAJE MORE SUCH VIDEO'S LIKE THIS ✅♥️🙏
Thank you mam...keep uploading these types of questions...it enhances our knowledge and help us to clear the interview ❤❤😊
Int x=(printf("hello world") , 18); Was asked in iit kgp mid sem exam.
@Jayadev-qs4jk
8 ай бұрын
i guess that comma is of no use there
@sebastian18059
5 ай бұрын
Same cheez hai, hello world hi print hoga
We want more videos like this😊
We want more this type of questions n this answer Thank u didi
Awesome
Yup its simple thanks for sharing ❤
Yr kitni piyri h y...AGR issy hi coding sekhi hoti to aj m programer hota😊
Hello5 is correct Output The Print statement hello will also be printed, talking about next statement, the length of HELLO that is 5 is printed after that without any space
I predicted it right in those 3 sec.
please more videos like this ❤
hey mam ; may the R8 answer will be "hello5"
@advaitgadekar6771
2 ай бұрын
But int return only integer walue how hello can home?
Bring more videos like this, or make a large video like this , this types of questions come in OA , and the prefix and postfix thing also common...
5 , print function returns the length of the printed string
Int is an integer and not a character so only the number 5 will be printed as opposed to being an array of characters [ ] such as hello which is 5 characters. so printf function of hello will be printed and then the number of characters in number "5"
@VirenderJi-gs2qs
Ай бұрын
Indeed
I run this program/code answer aya - hello5.🤔
@Rama_Siva
6 ай бұрын
@@vivekdhamande8350 bro character nahi hai eiaha.😂
@sarwanray12
6 ай бұрын
Ha bhai answer hello5 hi ayega isme x ka value kya print hoga questions ye hai uska answer hai 5
In this question answer is "HELLO 5" BECAUSE value of int x is how many alphabet in Hello and hello is also print
@shikharpahade3959
9 ай бұрын
Data type is int , so only integer value will be printed
@kanhagarg1525
9 ай бұрын
Hello5 without space
@DarkMysterioGaming
9 ай бұрын
@@shikharpahade3959no bro
@superbikelover01
9 ай бұрын
@@kanhagarg1525 yes but I mention in this comments for understanding "HELLO5" THIS IS REAL OUTPUT
@shriyanshu_9k
9 ай бұрын
@@shikharpahade3959bhai practical krke check krle....hello5 print ho rha h
Intelligent
'X'usiko kahata ha jo hame chor ka chali jati ha 😢😅
Also it is return blank space and integer value ..
Outstanding shradhha ji
great pls post like this videos..
Those who are saying it prints Hello5, try running only int x= printf("Hello"); It will give 'Hello' as output, and if you write the complete code, it will print 'Hello5', meaning, 5 is the answer that x is returning
@OFCnaman
9 ай бұрын
Is shows error , bro int x sirf integer leta hai to int x ko ham print hello ko kaise print kr skte
awesome 👍
Hello5 not just 5 because we are printing the string too
for the people in the comments saying it will print hello5, the question in the video is: "what is x?", which mean what comes in place of x and the answer is '5'. The complete output will be 'Hello5'.
Jo printable cheeje hongi unka count number print hoga Jaise isme Hello ye sare printable hain Isiliye iska answer 5 aayega However isme \0 null character bhi hai but vo printable nhi hai isiliye vo is count me nhi add hoga
OUTPUT (Hello5) aa rha h
@ankitkumar-qi3cd
4 ай бұрын
correct bro, qki phle first wala printf apna Hello print krega, phir baad me next wala printf X ki value print krega :-) then output aayega Hello5
Its programming language specific question.. they questions are good for freshers and not for experienced developers.. 😂 these days people are asking inbuilt function's functionalities outcome
Intresting
Best question 🎉🎉
Impressed
#include int main() { // Write C code here int x = printf("Hello "); printf("%d ",x); return 0; } output ---> Hello 6
Phli bar koi sahi jawab mene dia hai apka 😂❤
My future dream world Best hacker banung ❤❤❤😊😊
%d indicates the integer value thats why 5 will be print
We want more like this...😇✨
THanks didiiii😍✨
Nice voice....😊😊
bht bdia pdate ho aap
keep posting such videos ma'am
I am a beginner. If c++ is an extended of c ,then why we use “printf” and “cout” to output a statement.
Thank you didi❤❤❤
if we do scanf then it gives the output "hello"
Very nice question ❓😊😊😊
There's nothing to "think" about this. If you know you know lol. You may not be able to just guess the return value out of a random function (random because you typically wouldn't use it like this) right. Typically in systems languages, they usually return the "number of bytes written" from printing or writing functions. So there's that.
Quite simple problem for those who atleast knows the function signature of printf function it return an integer which is equal to number of characters that it has successfully printed in the console screen.
It prints Hello5... Is there any way to print only number of characters not the original word in printf ??
X is an variable and it's stored the statement that are *hellow world*.
yes the x value is 5 .if we get this code output .than we have hello5 output
The answer is not only 5 . It's hello5 as printf("hello"); statement will also execute.
Great 👍 great 👏
This is not logic test. This is how much memory you have in your mind.
Thank you didi
Thank you👍😊
good . impressive
Thank you
Answer is " Hello5" not only 5 I also run the program
@Tbm4545
9 ай бұрын
Bete usne x ka value pucha hai na ki kya print hoga, Wo jo hello print horaha hao wo uper wali print statement ka ans hai aur uske bad x yani ki 5 print horaha hai, aur udhr new line statement nahi use ki hai isliye wo hello5 ek sath print hoarah hai
@luxrayy2041
7 ай бұрын
@@Tbm4545yeahhhh
@Hbjbsisbehsbsj
2 ай бұрын
@@Tbm4545 oh
impressive
Thank you very much
Yes my thinking is right
Certainly! Here's the corrected code that stores the value returned by `printf` in `x` and returns it: ```c #include int main() { int x = printf("hello"); printf("%d", x); return x; } ``` This code prints the length of the string "hello" followed by its actual length, and then returns the value of `x`. So the output will be: ``` hello5 ``` And the return value of the program will be `5`.
I am python programmer and i have never touched C but as i see int and then i saw d% and gussed that answer will be in digits atleast instead of string.
😂humne pahle video dekha to socha add hai😅😅😅
Thank you madam
I had my college placement today. They asked this question in the coding exam .
Me being a civil engineering student trying to understand the question with the help of answer😅