tag:blogger.com,1999:blog-959939550345671470.post7017181105035725140..comments2024-03-17T12:50:37.677+05:30Comments on C programming Interview questions and answers: Cyclic nature of data type in CPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-959939550345671470.post-62680457621529499902021-01-23T09:16:04.315+05:302021-01-23T09:16:04.315+05:30It will be unequal because str1 is the name of var...It will be unequal because str1 is the name of variable where it is stored in the form of array. So, str1 means the first address where it is stored, i.e. Memory location of "p" say 1024. Similarly, for str2 "p" will have different location say 2046. So, 1024 not equal to 2046. To compare two strings in C, we need strcmp command.Rishabhhttps://www.blogger.com/profile/13047406404091522979noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-36622175558711762902016-08-12T22:41:01.860+05:302016-08-12T22:41:01.860+05:30Int main()
{
Char str1[]="pratik";
Char ...Int main()<br />{<br />Char str1[]="pratik";<br />Char str2[]="pratik";<br />If(str1==str2)<br />print("equal\n");<br />else<br />printf("unequal\n");<br />return 0;<br />}<br /> What will be the output??Unknownhttps://www.blogger.com/profile/00605830389934374493noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-11114527514704076812016-08-12T22:40:21.756+05:302016-08-12T22:40:21.756+05:30Int main()
{
Char str1[]="pratik";
Char ...Int main()<br />{<br />Char str1[]="pratik";<br />Char str2[]="pratik";<br />If(str1==str2)<br />print("equal\n");<br />else<br />printf("unequal\n");<br />return 0;<br />}<br /> What will be the output??Unknownhttps://www.blogger.com/profile/00605830389934374493noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-7213047540178567172016-06-14T21:24:40.713+05:302016-06-14T21:24:40.713+05:30Awesome explanation.....a ton of thanks to u ........Awesome explanation.....a ton of thanks to u .....it greatly helped me understand C Anonymoushttps://www.blogger.com/profile/00732557151932817861noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-52808069541747629252015-10-17T18:22:49.237+05:302015-10-17T18:22:49.237+05:30Thanks a ton for posting good questions that help ...Thanks a ton for posting good questions that help widen our understanding of how computers workAnonymoushttps://www.blogger.com/profile/10599638021396741332noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-56200918956397702362015-09-24T14:33:16.152+05:302015-09-24T14:33:16.152+05:30hey,it was very helpful.but you wrote 653535 inste...hey,it was very helpful.but you wrote 653535 instead of 65535 in point 3 and ubsigned instead of signed in point 4.:)Anonymoushttps://www.blogger.com/profile/02061643854987429305noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-26055741570014526572013-10-21T18:20:40.122+05:302013-10-21T18:20:40.122+05:30Really very good and easy to understand
Really very good and easy to understand<br />kirunoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-81103294780847736012013-07-02T04:24:55.786+05:302013-07-02T04:24:55.786+05:30subtract 127 from 200 and add result to -128... u ...subtract 127 from 200 and add result to -128... u vl get -56 as ans coz of cyclic property.<br />u didn't specify whether a is signed or unsigned so by default compiler is taking it as signed...Kkhttps://www.blogger.com/profile/02776912552747359940noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-44340031145621273572013-06-28T17:22:35.100+05:302013-06-28T17:22:35.100+05:30#include
#include
void main()
{
char a=200;
pintf(...#include<br />#include<br />void main()<br />{<br />char a=200;<br />pintf("%d",a);<br />getch();<br />}<br />o/p is -56...how????plzz explain.....<br /><br />Inwhich category he comes 1,2,3Anonymousnoreply@blogger.com