Тёмный

Interview Question | C Programming Language 

Apna College
Подписаться 5 млн
Просмотров 2 млн
50% 1

Опубликовано:

 

18 сен 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 890   
@yashpreetsinghkalsi5380
@yashpreetsinghkalsi5380 9 месяцев назад
same question was asked in my internship interview
@Socialmedia......Addiction
@Socialmedia......Addiction 9 месяцев назад
Toh answer kya Diya tha?
@rajshiromani727
@rajshiromani727 9 месяцев назад
Tb bhi ans ni pta bhai?? Ans is Hello5😅
@TarunSharma-eq3fg
@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
@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
@TarunSharma-eq3fg 9 месяцев назад
@@gulhusain6015 oh thanks 😅
@shubh_m1
@shubh_m1 9 месяцев назад
Please keep posting videos like this.
@Sam_sh02
@Sam_sh02 9 месяцев назад
​@@nishagwaliya476???
@rudragajjar454
@rudragajjar454 9 месяцев назад
output is: 'Hello 5' since the printf("Hello"); statement will also be executed
@rajshaikh3448
@rajshaikh3448 9 месяцев назад
Bhai bilkul sahi bola
@sky333suraj
@sky333suraj 9 месяцев назад
The format specifier %d just prints integer.
@rudragajjar454
@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
@mohammedarifofficial 8 месяцев назад
I think "hello 5" is the real answer;
@hammer455
@hammer455 7 месяцев назад
No answer is Hello5 no space between them ..
@thesniperxd5302
@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 ❤
@sohamghosh533
@sohamghosh533 9 месяцев назад
Output is "Hello5" not just 5 as it will also execute printf("Hello")
@hitendrachakrawarti5821
@hitendrachakrawarti5821 9 месяцев назад
Yes bro it will excute Hello5
@user-zm6nk5mw9i
@user-zm6nk5mw9i 9 месяцев назад
No
@nonwestern_outofslavery
@nonwestern_outofslavery 9 месяцев назад
me too
@Ankitkumar-pn2lv
@Ankitkumar-pn2lv 9 месяцев назад
Yes hello5
@CHAUDHARY_PRAYAS
@CHAUDHARY_PRAYAS 9 месяцев назад
Bhai you are right but she asked what will be printed in place of x not complete o/p
@harshahm0130
@harshahm0130 9 месяцев назад
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
@ratnajaiswal169 9 месяцев назад
Is there any way to print only number of characters not the original word in printf ??
@K15H4N
@K15H4N 9 месяцев назад
​@@ratnajaiswal169space Instead of word.
@iTsRko_
@iTsRko_ 4 месяца назад
Hello 5
@kratika83186
@kratika83186 15 дней назад
@@ratnajaiswal169 yes indeed , use int x = strlen(“Hello”); and define library function #include
@wildyoutuber2615
@wildyoutuber2615 12 дней назад
what is x not output
@rounakverma8115
@rounakverma8115 6 месяцев назад
This is most common question among all the interviewers, thanku mammm!
@peak_911
@peak_911 9 месяцев назад
I think this concept of interview qs type videos is very helpful, can you guys make a playlist for interview qs shorts?
@anshu2005
@anshu2005 9 месяцев назад
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
@ankitmishra697 8 месяцев назад
🙄 Wow bro... ❤
@mubashiriqbal7656
@mubashiriqbal7656 9 месяцев назад
Keep posting this type of question and also aptitude questions also...🙏
@rishabshukla5077
@rishabshukla5077 9 месяцев назад
We need more like this
@sanatani-aatma
@sanatani-aatma 6 месяцев назад
Samjh to nahi aaya but sunke acha laga 😂😂😂
@bavyagastya2149
@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
@SwingMotor 4 месяца назад
Sanatani ko kab se samaz nhi aa rha ha 😅😅
@anuj-13
@anuj-13 3 месяца назад
😂😊
@AlhamdulillahW
@AlhamdulillahW 3 месяца назад
​@@SwingMotor 😂😂😂
@Shrutiyadav_108
@Shrutiyadav_108 Месяц назад
​@@SwingMotor Jo samjha rahi hai vah bhi sanatani hi hai
@NayanW5
@NayanW5 9 месяцев назад
Wow! Each day you learn something new...
@introvertsenpai9968
@introvertsenpai9968 9 месяцев назад
Thank you ma'am, I thought I was good at C language but this was something new for me 😊
@sahilmane8551
@sahilmane8551 8 месяцев назад
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.
@pavitrakumarsahu2522
@pavitrakumarsahu2522 9 месяцев назад
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
@pavitrakumarsahu2522 9 месяцев назад
Please c plus plus ka bhi padha do
@siddheshnarwade3647
@siddheshnarwade3647 29 дней назад
As a 12 th std student i m happy to ans the question correctly 😅❤
@rohansapate3890
@rohansapate3890 9 месяцев назад
We want more such shorts on C and Java.
@Reactiverahul
@Reactiverahul Месяц назад
In python Output Hello None
@mansuralikhanpathan4077
@mansuralikhanpathan4077 9 месяцев назад
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🙏🏻🙏🏻.
@sanket7877
@sanket7877 9 месяцев назад
didi pls aisehi minute concepts which student ignore during interviews , aur laiye. It will be very helpful
@technoprogramming4753
@technoprogramming4753 Месяц назад
5 because printed function returns lengthy of a string
@zoyasaiyyad6579
@zoyasaiyyad6579 9 месяцев назад
Good question ❤
@purveshmahendrakar2110
@purveshmahendrakar2110 9 месяцев назад
Make a full length video of understanding this type of concepts
@user-he7pc4ty1u
@user-he7pc4ty1u Месяц назад
Aise hi logic question banate raho mam 😊
@sayuri_20
@sayuri_20 9 месяцев назад
Sis, You really motivate me to study every time I see you. I like You already.
@user-on7mj6bd8p
@user-on7mj6bd8p 4 месяца назад
Thank you! I have learned from this video. ❤
@kunalmahurkar271il
@kunalmahurkar271il 9 месяцев назад
Didi @ApnaCollegeOfficial Correct answer is **Hello 5** Because of %d is used length of *hello* also print.
@shriyanshu_9k
@shriyanshu_9k 9 месяцев назад
Yss
@Hbjbsisbehsbsj
@Hbjbsisbehsbsj 2 месяца назад
Without space
@advaitgadekar6771
@advaitgadekar6771 2 месяца назад
But int return only integer walue how hello can home?
@QuanAffinity
@QuanAffinity 17 дней назад
Hello5 not Hello 5 no spaces
@TonyStark-zl3ms
@TonyStark-zl3ms 9 месяцев назад
Thank you mam...keep uploading these types of questions...it enhances our knowledge and help us to clear the interview ❤❤😊
@akashsonar6332
@akashsonar6332 9 месяцев назад
These small things make big difference in interview..
@jayrawat3929
@jayrawat3929 8 месяцев назад
Meaningful❤
@rohityadavmudra
@rohityadavmudra 9 месяцев назад
IT IS HELPFUL, MAJE MORE SUCH VIDEO'S LIKE THIS ✅♥️🙏
@Memer09157
@Memer09157 6 месяцев назад
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
@MaaRiGAMINGOP
@MaaRiGAMINGOP 9 месяцев назад
First line will give output Hello and assign value to x then second line print 5 combine will be Hello5
@anurag-bh2ug
@anurag-bh2ug 5 месяцев назад
We want more videos like this😊
@amritanshpandey
@amritanshpandey Месяц назад
Awesome
@khazeemakanwal7213
@khazeemakanwal7213 8 месяцев назад
We want more this type of questions n this answer Thank u didi
@superbikelover01
@superbikelover01 9 месяцев назад
In this question answer is "HELLO 5" BECAUSE value of int x is how many alphabet in Hello and hello is also print
@shikharpahade3959
@shikharpahade3959 9 месяцев назад
Data type is int , so only integer value will be printed
@kanhagarg1525
@kanhagarg1525 9 месяцев назад
Hello5 without space
@DarkMysterioGaming
@DarkMysterioGaming 9 месяцев назад
​@@shikharpahade3959no bro
@superbikelover01
@superbikelover01 9 месяцев назад
@@kanhagarg1525 yes but I mention in this comments for understanding "HELLO5" THIS IS REAL OUTPUT
@shriyanshu_9k
@shriyanshu_9k 9 месяцев назад
​@@shikharpahade3959bhai practical krke check krle....hello5 print ho rha h
@AryanJC07
@AryanJC07 8 месяцев назад
Yup its simple thanks for sharing ❤
@killxsad
@killxsad 8 месяцев назад
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'.
@AyoubTahlilHersi
@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
@VirenderJi-gs2qs Месяц назад
Indeed
@fantastic_nisha
@fantastic_nisha 9 месяцев назад
please more videos like this ❤
@hamzahashmiofficial
@hamzahashmiofficial 9 месяцев назад
Intelligent
@mukherjee.p
@mukherjee.p 20 дней назад
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.
@princepexz
@princepexz 9 месяцев назад
Intresting
@divine3832
@divine3832 9 месяцев назад
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
@OFCnaman 9 месяцев назад
Is shows error , bro int x sirf integer leta hai to int x ko ham print hello ko kaise print kr skte
@tgayush1424
@tgayush1424 9 месяцев назад
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...
@meetparmar2107
@meetparmar2107 9 месяцев назад
Int x=(printf("hello world") , 18); Was asked in iit kgp mid sem exam.
@Jayadev-qs4jk
@Jayadev-qs4jk 8 месяцев назад
i guess that comma is of no use there
@sebastian18059
@sebastian18059 5 месяцев назад
Same cheez hai, hello world hi print hoga
@suvammagar5287
@suvammagar5287 Месяц назад
output is "hello5" but X is equals to 5
@ramjiyadav5147
@ramjiyadav5147 4 месяца назад
Outstanding shradhha ji
@mr.healthbeat5173
@mr.healthbeat5173 8 месяцев назад
I predicted it right in those 3 sec.
@onetofun
@onetofun 9 месяцев назад
We want more like this...😇✨
@Sattari_01
@Sattari_01 2 месяца назад
Yr kitni piyri h y...AGR issy hi coding sekhi hoti to aj m programer hota😊
@ayushthaware344
@ayushthaware344 9 месяцев назад
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
@AkashSupkar-io9up
@AkashSupkar-io9up Месяц назад
'X'usiko kahata ha jo hame chor ka chali jati ha 😢😅
@lokeshhemane2153
@lokeshhemane2153 9 месяцев назад
great pls post like this videos..
@k28999
@k28999 9 месяцев назад
keep posting such videos ma'am
@mrpaulcreations2172
@mrpaulcreations2172 9 месяцев назад
5 , print function returns the length of the printed string
@president-0-0-7
@president-0-0-7 5 месяцев назад
awesome 👍
@garimadixit4634
@garimadixit4634 9 месяцев назад
Best question 🎉🎉
@komalkhatod1042
@komalkhatod1042 9 месяцев назад
Very nice question ❓😊😊😊
@TIMEZEDFF
@TIMEZEDFF 9 месяцев назад
My future dream world Best hacker banung ❤❤❤😊😊
@SidsAnalysis
@SidsAnalysis 6 месяцев назад
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
@ShauryaThareja
@ShauryaThareja 9 месяцев назад
bht bdia pdate ho aap
@Abhishek-qw2mf
@Abhishek-qw2mf 9 месяцев назад
Phli bar koi sahi jawab mene dia hai apka 😂❤
@madhukantsingh_MSI_GROUP
@madhukantsingh_MSI_GROUP 5 месяцев назад
Nice voice....😊😊
@CaptainCoder1
@CaptainCoder1 9 месяцев назад
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.
@sagaryadu976
@sagaryadu976 9 месяцев назад
Also it is return blank space and integer value ..
@Lets_coding18
@Lets_coding18 4 месяца назад
THanks didiiii😍✨
@ujjwalchowdhury2551
@ujjwalchowdhury2551 8 месяцев назад
Great 👍 great 👏
@Rama_Siva
@Rama_Siva 9 месяцев назад
I run this program/code answer aya - hello5.🤔
@Rama_Siva
@Rama_Siva 6 месяцев назад
​@@vivekdhamande8350 bro character nahi hai eiaha.😂
@sarwanray12
@sarwanray12 6 месяцев назад
Ha bhai answer hello5 hi ayega isme x ka value kya print hoga questions ye hai uska answer hai 5
@bhavinpancholi3488
@bhavinpancholi3488 9 месяцев назад
good . impressive
@approgrammingdoor1373
@approgrammingdoor1373 9 месяцев назад
One idea to take is, when we r printing the value of x we also used "%d" which represents an int so the output will be hello5 5 = charector of str.
@motivationallifevideos1
@motivationallifevideos1 6 месяцев назад
😂humne pahle video dekha to socha add hai😅😅😅
@sagardas9060
@sagardas9060 Месяц назад
I had my college placement today. They asked this question in the coding exam .
@Harry-fg8fp
@Harry-fg8fp 9 месяцев назад
Keep posting these kind of shorts didi
@shubhangiagarkar1708
@shubhangiagarkar1708 2 месяца назад
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`.
@kishoraryal663
@kishoraryal663 2 месяца назад
Impressed
@user-yy7uw1qx9h
@user-yy7uw1qx9h 7 месяцев назад
X is an variable and it's stored the statement that are *hellow world*.
@Aarya_x12
@Aarya_x12 9 месяцев назад
OUTPUT (Hello5) aa rha h
@ankitkumar-qi3cd
@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
@sahilchopde1450
@sahilchopde1450 9 месяцев назад
Answer is " Hello5" not only 5 I also run the program
@BatMan__45
@BatMan__45 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
@luxrayy2041 7 месяцев назад
​@@BatMan__45yeahhhh
@Hbjbsisbehsbsj
@Hbjbsisbehsbsj 2 месяца назад
​@@BatMan__45 oh
@muhammadameerhamza8842
@muhammadameerhamza8842 2 месяца назад
Informative
@pritigulhane3542
@pritigulhane3542 5 месяцев назад
Thank you👍😊
@VishalSingh-nn4ne
@VishalSingh-nn4ne 6 месяцев назад
%d indicates the integer value thats why 5 will be print
@owaisahmadshah6744
@owaisahmadshah6744 9 месяцев назад
Wow!
@ratnajaiswal169
@ratnajaiswal169 9 месяцев назад
It prints Hello5... Is there any way to print only number of characters not the original word in printf ??
@pintugujjar1334
@pintugujjar1334 9 месяцев назад
Me being a civil engineering student trying to understand the question with the help of answer😅
@user-dh6gd1wv2t
@user-dh6gd1wv2t 9 месяцев назад
Thank you very much
@learningfiru
@learningfiru 3 месяца назад
hey mam ; may the R8 answer will be "hello5"
@advaitgadekar6771
@advaitgadekar6771 2 месяца назад
But int return only integer walue how hello can home?
@StaticTechnology
@StaticTechnology 5 месяцев назад
This is not logic test. This is how much memory you have in your mind.
@zimon7182
@zimon7182 6 месяцев назад
Thank you didi❤❤❤
@AshutoshSingh-do4ts
@AshutoshSingh-do4ts 2 месяца назад
👍👍
@Anemptysoul
@Anemptysoul 6 месяцев назад
The answer is not only 5 . It's hello5 as printf("hello"); statement will also execute.
@user-js6ds2qx3v
@user-js6ds2qx3v 9 месяцев назад
I like these topics
@AslamNazeerShaikh
@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
@mohammadabdullahaalforhad1375
@mohammadabdullahaalforhad1375 5 месяцев назад
impressive
@20feveramira02
@20feveramira02 9 месяцев назад
আপ বাহাত বাহাত সুরাত হে❤❤❤❤
@zimon7182
@zimon7182 6 месяцев назад
Thank you didi
@bharvadhardik3573
@bharvadhardik3573 4 месяца назад
❤🎉👌
@MdRakibulhasan-dq5dh
@MdRakibulhasan-dq5dh 8 месяцев назад
yes the x value is 5 .if we get this code output .than we have hello5 output
Далее
😍😂❤️ #shorts
00:12
Просмотров 105 тыс.
▼ЧЁРНАЯ МАГИЯ 🔮
31:15
Просмотров 398 тыс.
basics of CODING in 10 minutes
15:34
Просмотров 1,5 млн
c language in 11 minutes (for beginners)
11:19
Просмотров 3,1 тыс.
Learn C Language In 10 Minutes!! C Language Tutorial
10:36
5 Things you should know before Engineering : )
9:32
Просмотров 546 тыс.
Why so many Coding Languages are created?
10:01
Просмотров 586 тыс.