tag:blogger.com,1999:blog-959939550345671470.post7196519380652079229..comments2024-03-17T12:50:37.677+05:30Comments on C programming Interview questions and answers: C Linux interview questions and answersPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-959939550345671470.post-65084013345735682582023-11-27T12:19:05.070+05:302023-11-27T12:19:05.070+05:30This Information Very Helpful to everyone. online ...This Information Very Helpful to everyone. online English tuition program – where language evolution begins at home. Ziyyara’s meticulously crafted curriculum, led by experienced tutors, caters to learners of all levels.<br />For more info visit <a href="https://ziyyara.com/online-tuition-for-english" rel="nofollow"> Online english tuition </a>Rupesh Kumarhttps://www.blogger.com/profile/04936151210814213417noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-8401194845955128002023-09-07T11:50:33.292+05:302023-09-07T11:50:33.292+05:30This is my first time i visit here and I found so ...This is my first time i visit here and I found so many interesting stuff in your blog. Discover top-quality online tuition for GCSE classes with Ziyyar Edutech. Our dedicated platform offers comprehensive GCSE online tuition, providing students with expert guidance and support.<br />For more info visit <a href="https://ziyyara.in/home-tuition/online-home-tuition-for-gcse-board" rel="nofollow"> Rupesh Kumarhttps://www.blogger.com/profile/04936151210814213417noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-41144008193108102442020-10-14T13:27:42.125+05:302020-10-14T13:27:42.125+05:30Awesome Blog!!! Thanks for it, it is more useful f...<br />Awesome Blog!!! Thanks for it, it is more useful for us.<br /><br /><br /><a href="https://www.fita.in/hacking-books/" rel="nofollow">ethical hacking books</a><br /><a href="https://www.fita.in/hacking-books/" rel="nofollow">best hacking books</a><br /><a href="https://www.fita.in/python-interview-questions-and-answers/" rel="nofollow">python interview questions and answers</a><br /><a hrefVijayakashhttps://www.blogger.com/profile/04404961308461606997noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-8797400217278624692017-10-04T14:57:39.959+05:302017-10-04T14:57:39.959+05:30anyone explain the answer of following program
#i...anyone explain the answer of following program<br /><br />#include<br /> int main(){<br /> int a=500;<br /> char *p=(char *)&a;<br /> printf("%d\n",*p);<br /> printf("%d",*++p);<br /> return 0;<br />}Anonymoushttps://www.blogger.com/profile/10017565510119780618noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-91986314999241821182016-07-04T00:35:00.823+05:302016-07-04T00:35:00.823+05:30Input:1a2b3c
Output: 123
abcInput:1a2b3c<br />Output: 123<br /> abcAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-21300167273778968152016-04-14T15:19:02.463+05:302016-04-14T15:19:02.463+05:30OMG so interesting questions I like it <3.OMG so interesting questions I like it <3.Anonymoushttps://www.blogger.com/profile/07868407838243682295noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-24322233547390882392014-01-28T07:53:50.204+05:302014-01-28T07:53:50.204+05:30the printf function eventually ends up calling ...the printf function eventually ends up calling write system call . you can check that using strace command <br />e. g . strace ./a.out . it will give the trace of all systems calls called by a program Anonymoushttps://www.blogger.com/profile/02357305585749662598noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-26061710228913663462013-08-09T12:33:10.185+05:302013-08-09T12:33:10.185+05:30does anyone explain the answer of question no 3
t...does anyone explain the answer of question no 3 <br />that why what is reason of 24 in answer sequence<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-88541716138063850542013-08-06T12:36:28.456+05:302013-08-06T12:36:28.456+05:30does printf() calls the system function : write()...does printf() calls the system function : write()?<br />[fwrite,fputs and fputs uses write() system function and I know working of these but how printf uses write() system call ? ]<br />anybody explain plzz.. thanks <br />Anonymoushttps://www.blogger.com/profile/09029233615406891080noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-28616051278145223152013-06-05T16:35:06.001+05:302013-06-05T16:35:06.001+05:30i think u've to evaluate from left to right.
...i think u've to evaluate from left to right. <br />in this case x= 7+7+8;<br />if its from right to left , j=5;;y=--j + ++j + ++j; should give value of j=20;<br />but output=16; 5+5+6;Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-34241760433103404462013-04-19T02:48:13.448+05:302013-04-19T02:48:13.448+05:30please read k&r...it says the behaviour of suc...please read k&r...it says the behaviour of such an expression is undefined....Anonymoushttps://www.blogger.com/profile/05005946499485323792noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-74014503129342371702013-04-18T15:04:23.869+05:302013-04-18T15:04:23.869+05:30Hello Mr. Programmer I have a question for you:
in...Hello Mr. Programmer I have a question for you:<br />int i=2;<br />printf("%d",(++i)+(i)+(++i));<br /><br />whenever i change the the value of (i) to take the samples the program output goes out of expectations.<br />can you evaluate this expression by taking different values of (i) and also by changing order of precedence of (i).<br />thankyoukmlrobhttps://www.blogger.com/profile/00938841072972679697noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-33373216018723216642013-04-07T23:40:20.353+05:302013-04-07T23:40:20.353+05:30But some c heaterfiles are not run.
Ex:
#include
#...But some c heaterfiles are not run.<br />Ex:<br />#include<br />#include<br />Anonymoushttps://www.blogger.com/profile/15206302635524653777noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-48222681552154337702013-03-03T01:48:29.979+05:302013-03-03T01:48:29.979+05:30hey dear
i tell you about prefix and postfix ..
(...hey dear<br />i tell you about prefix and postfix ..<br /><br />(1) prefix :- first increment after then use..<br />(2)postfix :- first use after then increment..<br /><br />example for prefix<br />#include<br />int main()<br />{<br /> int i = 5;<br /> printf("%d\n",++i);// here i incrementing and then printing so output is 6<br /> return 0;<br />}<br />output - 6<br /><br />Anonymoushttps://www.blogger.com/profile/11112671278798145087noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-56211870866805846972013-03-03T01:38:10.806+05:302013-03-03T01:38:10.806+05:30hey dear there is a matter of sequence point in c....hey dear there is a matter of sequence point in c..<br />whenever you perform many operation on a single variable in one statement the the output is undefined..<br /><br />i have one conclusion<br />i = 5; <br />x = ++i + ++i ++i ;<br />unary operator evalute right to left so <br />first time i becomes 6<br />then 7<br />but here is interesting thing is that i value of first RHS depends on secondAnonymoushttps://www.blogger.com/profile/11112671278798145087noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-74828863027924751272013-03-03T01:36:34.527+05:302013-03-03T01:36:34.527+05:30hey dear there is a matter of sequence point in c....hey dear there is a matter of sequence point in c..<br />whenever you perform many operation on a single variable in one statement the the output is undefined..<br /><br />i have one conclusion<br />i = 5; <br />x = ++i + ++i ++i ;<br />unary operator evalute right to left so <br />first time i becomes 6<br />then 7<br />but here is interesting thing is that i value of first RHS depends on secondAnonymoushttps://www.blogger.com/profile/11112671278798145087noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-59824063817162611542013-02-19T01:06:47.131+05:302013-02-19T01:06:47.131+05:30it's like a magic:P
again x is incremented by ...it's like a magic:P<br />again x is incremented by 1;<br />if you scan the number i and j then it will not incremented..<br />test it :DAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-4698807521460046062013-01-17T22:35:08.196+05:302013-01-17T22:35:08.196+05:30Could any one please clarify the post fix and pre ...Could any one please clarify the post fix and pre fix argument evaluation . qn (3)Pradeep Gnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-8008678843892634812013-01-17T11:11:28.202+05:302013-01-17T11:11:28.202+05:30it is good.it is good.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-88284478684317209072012-07-02T21:06:19.156+05:302012-07-02T21:06:19.156+05:30Could any one please clarify the post fix and pre...Could any one please clarify the post fix and pre fix argument evaluation .Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-73938085747153944522012-06-28T04:41:29.642+05:302012-06-28T04:41:29.642+05:30would you clarify me why the output of question nu...would you clarify me why the output of question number 3 is 22 22 8.Thanks!Anonymoushttps://www.blogger.com/profile/15739677798675528334noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-60991921008181023382012-04-03T01:19:48.843+05:302012-04-03T01:19:48.843+05:30(a++, a++, ++a) means it starts from right-side , ...(a++, a++, ++a) means it starts from right-side , ++a will increment a value and replaces the final value of a, now a=6 and next expr a++ increment a and replaces previous value of a ( 6 ), now a= 7, next a++ also increment a and replaces previous value of a (7), now a=8, that value in place of ++a,<br />whenever ++a is coming all will replaced by final value of aBiju MKhttps://www.blogger.com/profile/00331401658626368458noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-61738837106822087502012-03-30T15:01:32.888+05:302012-03-30T15:01:32.888+05:30why answer of 1st question is 7 6 8 in linux . wha...why answer of 1st question is 7 6 8 in linux . what is the concept behind it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-2602440370172179082012-02-09T23:39:34.959+05:302012-02-09T23:39:34.959+05:30Very Useful TutorialVery Useful TutorialImran Mirzahttps://www.blogger.com/profile/06596432742592989450noreply@blogger.com