Hello Neso Academy, Could you please enable all English closed captioning for all of your C programming lectures? I would be grateful if you do that. Because I am deaf so I cannot hear your explanations. Thank you
That moment where I actually understand things :) brings tears to my eyes. Thank you. I am trying to prepare more before I graduate and these lessons are helping so much.
In C, Q3 is not guaranteed to work if char is signed, as the result of the narrowing value conversion is either implementation-defined (as the signed-type representation is implementation-define). On compilers which define char as unsigned, it is guaranteed to work and print 9. And this all of course assumes that CHAR_BIT is 8. Just to make you aware that the results are by no means guaranteed by the standard. (if CHAR_BIT is say 16, then it prints 265), and if char is signed using sign-and-magnetude, it prints -117 (as 255 converts in that narrowing value conversion to -127, then -127+10=-117).
255 in binary comes out to be 0b11111111, which comes out to be the same for the binary representation of -1 (0b11111111).. So, for signed representation, 'c' will have a value of -1.. Upon adding 10 to that, it assumes the value 9.. The other case of unsigned representation of the character 'c', has been explained in the video.. However, by default, upon declaration, the 'signed' modifier is chosen for the character..
@@royarijit998 C does not specify a default sign or integer encoding. The binary representation of -1 could be 0b10101010 for all you know. The default sign could be both signed or unsigned. It's even possible that char has 50 bits.
In Q3. In declaration statement Char c=255; U can not e specify modifier THEN compiler implicit assume by default it is signed Range would be -128 to 127 But u assign c=255; na This value is already out of range then compiler do cyclic process 255 is equivalent to - 1 Then finally c contain - 1 C=c+10; C= - 1 + 10 C=9; Out put is 9 ( in hole explanation we assume character take 1 byts= 8 bits Thank you neso academy
shailesh kushwaha This isn't guaranteed. This assumes a) The compiler defines signed integers as 2s compliment, b) the compiler has bitwise conversion for out-of-range singed integers Both of which are unspecified. Also, char on its own is a distinct type from signed char, and it is implementation defined if the type is signed or unsigned. (See en.cppreference.com/w/c/language/arithmetic_types for details). Further, this also depends on having 8-bit bytes (CHAR_BIT=8), which is not always true.
I can't pay you back Neso Academy, but I assure you, once I get a job, I'll surely contribute to this channel. The way you are providing such a nice content for free of cost, it's just amazing!!! Edit : I had bought the neso fuel
2 saal baad ye reply Dene aya payback toh krk ja neso ko 😂😂 Sorry Bhai meto Gaya nahi clg ese hi Matrix me kaam kr raha hu Abhi bhi unemployed h kya bro ?
I would strongly advise you to include to which standard you are adhering. After C99 using implicit integer will at least throw a compiler warning and depending on parameters will not even compile.
App agar c programming sikhane lag gaye to case hi nehi hain... Many engineering graduate will be beneficial from thiz... With the help ur videos we passed the exam of digital logic, basic eletronics subject... Who ever you r... U r in the in the heart sir....
Thank you! I had a pending program since long time. Today i was just watching your video when a concept clicked in my mind because of a small concept which learned from your video. My program is completed,i am thankful.
These videos are really helpful, I watch them with my friends on Voicely whenever we practice coding. We all agree that we learned more from UA-cam videos than from school lol
Unfortunately, the answer to Question 3 is a _lot_ more complicated than presented here. Depending on the implementation, plain "char" can be either signed _or_ unsigned. The encodings for characters in the _basic character set_ (upper- and lowercase Latin characters, digits, most punctuation) are guaranteed to be non-negative, but encodings for additional characters may be negative or positive. If plain "char" is unsigned, then the value will "wrap" as described. If it's signed, then the behavior is *undefined* . You _may_ get a result of 9. You may get something different.
@@duggirambabu7792 It _may_ give the same answer, but it isn't guaranteed. Unsigned overflow is well-defined; signed overflow is not. If you're on a system that uses two's complement to represent signed values and doesn't do anything funky on signed overflow, then yes, you are likely to get the same result. On a system that uses ones' complement or sign-magnitude to represent signed values, or raises some exceptional condition on signed overflow, you'll likely get something completely different.
Character is capable of holding the information upto 1byte only which is equal to 8bits (that means the max value it can hold is 255) Data types obey the law of arithmetic modulo 2 raised to the power n where n is equal to 8 in this case Here ans is 265 mod 2 raised to the power 8
Please slove this question.. write a program to compute the value of u for different values of x at distinct instances of time and plots the series of graphs on u vs plot.
let me be frank, I like your videos and i've learnt a lot from you. Many at times i've been excited and some depressed, like in this video, i thought i understood the concepts until you asked the tough question. In short, thank you for sharpening our experience
Dear Sir, when you were teaching us signed integer and in that you were telling us how to represent -ve no. (Like -127), you were using place value method i.e. -2^7 and 2^0 to set -127. So my question is to you, can we apply same method to represent -3 rather than using 1's comp. Of 3, then adding 1 and finally gets 2's comp. Of -3?? Regards
Thank you soo much sir . I'm nothing without NASO academy . 😇 I cleared my entire engineering b'cos of you only . 😃 If i got a chance to meet you , it's been an one of the memorable moment in my life . 🤗
When I made the c fragment as like : #include Int main() { Printf("%d",printf("%10s","jee")); } Xpected output as: [. jee3] But the Output as shown as like this: [ jee10 ] Plse anyone let me know how's it possible? & If I'm wrong then tell me wh're my concept was wrong ...
Really great videos one can refer to these videos for certain competitive exam like gate too. Helped me a lot throughout. Thanks neso academy for such wonderful videos.
While it is true that most of the loosey goosey C compilers will accept the integer declaration shown in Q4 it is quite bad form to assume that every compiler will behave the same and much better for code readability and portability to explicitly and fully define your types. There is a big difference between what will compile w/o error and good coding practice.
Yeah, exactly. C dropped implicit type conversion a long time ago and it's just plain better than supporting legacy code like that. Especially in uni you usually have strict compilation parameters which are specific to the standard you are using and -pedantic will definitely not let you compile this.
Thank you for this complete and well ordganized Course about C. Very good explained with funny indian accent ;). Long story short : AMAZING. Thanks for sharing.
"signed i = value" equivalent to "int i = value", why? because when you write the signed modifier without any data-type after it, your compiler assume that i is either a variable of type int or it's a variable of type char, and that assumption depends on the value stored in i.
Depending on compiler and standard, this will probably either give you a warning or not compile at all (implicit type conversion is non standard since C 99)
In Q3: The range of signed char is -127 to 128 and for unsigned it is 0 to 255. But in the question it is signed as default. But you said the range is 255 here also? Enlighten me
#include int main() char c = 255; c = c + 10; { printf("%d", c); return 0; } Now let's fix the bug The bug in this code is that the variable c is a char type and is being assigned a value of 255, which is the maximum value that can be stored in a char . When 10 is added to this value, it will overflow and result in an undefined behavior. To fix this bug, we can change the data type of c to an int . Also, we can use a typecast to avoid overflow while adding 10 to the value. Here's the corrected code: #include int main() { int c = 255; c = (int)c + 10; printf("%d", c); return 0; }
Sir for question no.5, I tried the following code with long int and therefore, the size of long int is 8 bytes. Theoretically, I should get an answer different from the one you got but still I got the same answer as you described. Why isn't long int considering 8 bytes rather just 4 bytes?
Sir in question 3 there would be default modifier signed and therefore the range would be -128 to +127 so it can't hold 255 I thought so, after watching your answer I get confused...clear this please.
doubt:- input=#include int main() { printf("%d", printf("%s ","Hello world!")); return 2; } output= Hello world! 13 Process returned 2 (0x2) execution time : 0.750 s Press any key to continue. by adding" " why are number of characters are increasing??please anyone answer my doubt
But sir!! Consider the code: Printf("%10s","hello") it prints 5spaces and hello. Printf("%1s","hello") it prints 4 characters but not 1 mentioned,i didn't understand that.
5:56 a char is capable of holding value upto 255, but when a char is declared it is signed by default right? Then the range should be from -128 to 127? Ughhhh someone help. This is so confusing!
Hi sir, i have a doubt regarding q no:1 printf("%s","HELLO WORLD"); will print only HELLO right? ie till space is encountered? Answer should be HELLO 5 ??
Sir it means every negative no. Is present in 2scompement form in computer and that 2scomplement is equivalent to some positive value binary no. Please sir kindly answer my question and your teaching is gratefull sir
Hello #NesoAcademy In this video questions 2 where when we write %10s then it's priny five space before Hello Buy when we write %5s then it's doesn't print any space before Hello. Why? ÇOĎÈ: printf("%5s","Hello");
Hello Naman, it is because '%10s' prints upto 10 places and '%5s' prints upto 5 places and word 'hello' consists of 5 letters.so it does give any space before Hello. Hope This Helps You.
sir, with question 3, when i tried working out the mod on my calculator i keep getting 10, does that mean that 10 are the number of characters and 9 is the answer due to starting with 0?
Sir if printf also returns the no. Of characters it successfully prints on the screen then why don't we get 12 twice(once from the internal printf and other from external)??
Because they are two separate calls. It’s equivalent to writing int tmp = printf( "%s", "Hello, World!" ); // returns 12 printf( "%d", tmp ); // returns 2
Hi sir, I would like to ask a doubt in qs no. 4. Is it okay to declare i; only instead of int i; ? Will the compiler implicitly assumes the datatype int to the statement?
Hello Neso Academy, Could you please enable all English closed captioning for all of your C programming lectures? I would be grateful if you do that. Because I am deaf so I cannot hear your explanations. Thank you
You can do that on your UA-cam app settings
@@duffyduck4065 Buddy, some videos in the playlist are not haviing option to enable captions. Nevermind, I already learned from mycodeschool.
@@ParthKawatra all the best parth
@@ParthKawatra bhai plz tell me which is best between ravindra babu rabula sir vs neso academy
@@jainsahab8549 neso academy as it has wide variety of questions and easy explaination as well❤️🤗
That moment where I actually understand things :) brings tears to my eyes. Thank you. I am trying to prepare more before I graduate and these lessons are helping so much.
char = -128 ~ 127
unsigned char = 0 ~ 255
char a = 255
a(2) = 1111 1111
1111 1111 = -1
answer
a + 10 = 9
In C, Q3 is not guaranteed to work if char is signed, as the result of the narrowing value conversion is either implementation-defined (as the signed-type representation is implementation-define). On compilers which define char as unsigned, it is guaranteed to work and print 9. And this all of course assumes that CHAR_BIT is 8. Just to make you aware that the results are by no means guaranteed by the standard. (if CHAR_BIT is say 16, then it prints 265), and if char is signed using sign-and-magnetude, it prints -117 (as 255 converts in that narrowing value conversion to -127, then -127+10=-117).
Yes..u r correct..the question should signed char c or unsigned char c to avoid any complier specific results..
255 in binary comes out to be 0b11111111, which comes out to be the same for the binary representation of -1 (0b11111111).. So, for signed representation, 'c' will have a value of -1.. Upon adding 10 to that, it assumes the value 9.. The other case of unsigned representation of the character 'c', has been explained in the video.. However, by default, upon declaration, the 'signed' modifier is chosen for the character..
@@royarijit998 C does not specify a default sign or integer encoding. The binary representation of -1 could be 0b10101010 for all you know. The default sign could be both signed or unsigned. It's even possible that char has 50 bits.
In Q3.
In declaration statement
Char c=255;
U can not e specify modifier
THEN compiler implicit assume by default it is signed
Range would be
-128 to 127
But u assign c=255; na
This value is already out of range then compiler do cyclic process
255 is equivalent to - 1
Then finally c contain - 1
C=c+10;
C= - 1 + 10
C=9;
Out put is 9
( in hole explanation we assume character take 1 byts= 8 bits
Thank you neso academy
shailesh kushwaha This isn't guaranteed. This assumes a) The compiler defines signed integers as 2s compliment, b) the compiler has bitwise conversion for out-of-range singed integers Both of which are unspecified.
Also, char on its own is a distinct type from signed char, and it is implementation defined if the type is signed or unsigned. (See en.cppreference.com/w/c/language/arithmetic_types for details).
Further, this also depends on having 8-bit bytes (CHAR_BIT=8), which is not always true.
Finally You tube recommend something worth to watch.Thanks for the wonderful explanation.
this is from the legendary category course on youtube , explaination
on peek
I can't pay you back Neso Academy, but I assure you, once I get a job, I'll surely contribute to this channel. The way you are providing such a nice content for free of cost, it's just amazing!!!
Edit : I had bought the neso fuel
2 saal k baad bhi unemployed 🗿
@@Reptorex college gye hote to pta hota C programming 1st year me padhate hai. Now calculate the basic maths 😂
2 saal baad ye reply Dene aya payback toh krk ja neso ko 😂😂
Sorry Bhai meto Gaya nahi clg ese hi Matrix me kaam kr raha hu
Abhi bhi unemployed h kya bro ?
@@Reptorex referral hai?
@@SaurabhKumar-qc6og off campus 🗿
Sir i am preparing for gate 2020... ur videos whr in recommendation .. u hv no idea how good u are at teaching.... totally worth watching...
Hey wht you doing now
@@anuragsuryawanshi4177 chaprasi at vidya mandir school
@@rajaup4036 So rude tu lgja na chaprasi
I would strongly advise you to include to which standard you are adhering. After C99 using implicit integer will at least throw a compiler warning and depending on parameters will not even compile.
This is so great. Pronunciation is better than every other Hindis
I must say that this is best channel on youtube to learn programming
I never saw someone explains like this👏
This questions were just too helpful.
Glad that I find your channel sir 😀
The 2s comp representation of a signed num is -3 = 101 only so when treated as a positive num it is 5 .
6:50 IMP 265mod256=9 remainder
I am so lucky to have found your channel 😊
App agar c programming sikhane lag gaye to case hi nehi hain... Many engineering graduate will be beneficial from thiz... With the help ur videos we passed the exam of digital logic, basic eletronics subject... Who ever you r... U r in the in the heart sir....
in Q1, no need to write %s in the printf. Can just pass the string directly like printf("Hello\a
");
Q3 : char c is signed character , so c= 255 is equivalent to c = -1 and -1 + 10 = 9.
Thank you! I had a pending program since long time.
Today i was just watching your video when a concept clicked in my mind because of a small concept which learned from your video. My program is completed,i am thankful.
These videos are really helpful, I watch them with my friends on Voicely whenever we practice coding. We all agree that we learned more from UA-cam videos than from school lol
Unfortunately, the answer to Question 3 is a _lot_ more complicated than presented here.
Depending on the implementation, plain "char" can be either signed _or_ unsigned. The encodings for characters in the _basic character set_ (upper- and lowercase Latin characters, digits, most punctuation) are guaranteed to be non-negative, but encodings for additional characters may be negative or positive. If plain "char" is unsigned, then the value will "wrap" as described. If it's signed, then the behavior is *undefined* . You _may_ get a result of 9. You may get something different.
Signed or unsigned char will give same answer.
actually i get 19
@@duggirambabu7792 It _may_ give the same answer, but it isn't guaranteed. Unsigned overflow is well-defined; signed overflow is not. If you're on a system that uses two's complement to represent signed values and doesn't do anything funky on signed overflow, then yes, you are likely to get the same result. On a system that uses ones' complement or sign-magnitude to represent signed values, or raises some exceptional condition on signed overflow, you'll likely get something completely different.
@@johnbode5528 if the range of signed char is from -128 to 127, aren't we exceeding the range in this case which means we should divide 265 by 127?
I got a garbage value
A beautiful explanation
Happy to listen in a simple manner
Sir in question number 3 maximum value of char should be 127 ?. I am confused sir
No!
Char take 1 byte space having 8 bits ... and so the max range will be 255 ...
Char occupies 1 byte of memory and there is no point of signed and unsigned, since the binary representation will be same for both. Look into video 9
Character is capable of holding the information upto 1byte only which is equal to 8bits (that means the max value it can hold is 255)
Data types obey the law of arithmetic modulo 2 raised to the power n where n is equal to 8 in this case
Here ans is 265 mod 2 raised to the power 8
You got a new.. keen curious learner (beginner)of C as subscriber today✌
nice lectures by you sir
that too for free!
appreciated your efforts.
Nice
Please slove this question..
write a program to compute the value of u for different values of x at distinct instances of time and plots the series of graphs on u vs plot.
Great variety of questions! Loving the content
Thank u so much sir actually i like tge way u were teaching it helped me a lot🙇
let me be frank, I like your videos and i've learnt a lot from you. Many at times i've been excited and some depressed, like in this video, i thought i understood the concepts until you asked the tough question. In short, thank you for sharpening our experience
Dear Sir, when you were teaching us signed integer and in that you were telling us how to represent -ve no. (Like -127), you were using place value method i.e. -2^7 and 2^0 to set -127. So my question is to you, can we apply same method to represent -3 rather than using 1's comp. Of 3, then adding 1 and finally gets 2's comp. Of -3??
Regards
Thank you very much. You are a genius 👍👍🔝🔝
So good... finally got something really useful
2:49 no one teach us this one...its very helpfull
In the first question,Have u given space after "!" ,Then the output should be 13 :)
He hasnt given space after '!' char.
Thank you do much sir it was very helpful for me
Thank you soo much sir . I'm nothing without NASO academy . 😇
I cleared my entire engineering b'cos of you only . 😃
If i got a chance to meet you , it's been an one of the memorable moment in my life . 🤗
Can we meet sir ?
in this Q why 256divide by 255
char c=255;
c=c+10;
printf("%d",c);
return0;
out put is 9
When I made the c fragment as like :
#include
Int main()
{
Printf("%d",printf("%10s","jee"));
}
Xpected output as:
[. jee3]
But the Output as shown as like this:
[ jee10 ]
Plse anyone let me know how's it possible?
& If I'm wrong then tell me wh're my concept was wrong ...
As it also count spaces, output will have 10 not 3.
Its correct what's ur doubt
In question 3 there sholud be unsigned, otherwise it can not hold 255
Too good for the c programming language.well done
This is a really important video lecture, thank you very much Neso Academy.
Happy to find your lecture which is very understandable and clear...
Clear voice👍,,,,,thank you sir
1.
#include
int main() {
printf("%d", printf("%s", "hello world!"));
return 0;
}
2.
#include
int main() {
printf("%10s
", "hello!" );
printf("%s
", "hello!");
//printf("%10s
", "hello!" );
return 0;
}
3.
#include
int main() {
unsigned i=1;
int j=-4;
printf("%u
",i+j);
//printf("%10s
", "hello!" );
return 0;
}
Suggest from where i can find more questions like these (covering conceptual and hidden meaning of a syntax)
great channel, provides really helpful information
oe, my god, again a co-incidence or what.
i clicked on the video, and you've also watched it XD
What are frikking moment
@@mein.likhari lool
Really great videos one can refer to these videos for certain competitive exam like gate too. Helped me a lot throughout. Thanks neso academy for such wonderful videos.
Really amazing.... Plz make more videos on this topic
thank you sir helping for my placement
While it is true that most of the loosey goosey C compilers will accept the integer declaration shown in Q4 it is quite bad form to assume that every compiler will behave the same and much better for code readability and portability to explicitly and fully define your types. There is a big difference between what will compile w/o error and good coding practice.
Yeah, exactly. C dropped implicit type conversion a long time ago and it's just plain better than supporting legacy code like that. Especially in uni you usually have strict compilation parameters which are specific to the standard you are using and -pedantic will definitely not let you compile this.
qus no (3) we use clock analogy method we also get an answer 9
at 6:37, how did you explain n =8, how didi you know 2 raise to the power of 8?
thank you so much..i am preparing for ntpel exam..tis is very useful for me..tysm
Thank you for this complete and well ordganized Course about C. Very good explained with funny indian accent ;). Long story short : AMAZING. Thanks for sharing.
Such an amazing lecture. Keep it up sir ☺
"signed i = value" equivalent to "int i = value", why? because when you write the signed modifier without any data-type after it, your compiler assume that i is either a variable of type int or it's a variable of type char, and that assumption depends on the value stored in i.
Depending on compiler and standard, this will probably either give you a warning or not compile at all (implicit type conversion is non standard since C 99)
so DS/sometimes water controlled and damshello sirwell done your speech and thank you very much
have a great sir this topic is very helpful video sir.
Thanks you so much sir
Nice this is very good and really helpfull video sir , Thank you very much.
Thank you so much for this video. It is very helpful video 🙂
In Q3: The range of signed char is -127 to 128 and for unsigned it is 0 to 255. But in the question it is signed as default. But you said the range is 255 here also? Enlighten me
But in the question there is asked according to definition of integer so Option a is correct .Compiler or Computer will assume as int
10:55 Q5 answer 2^n - 3.
I heartfully thanks to neso academy. I learned full course in this channel. It helps alot in my career...
#include
int main()
char c = 255;
c = c + 10;
{
printf("%d", c);
return 0;
}
Now let's fix the bug
The bug in this code is that the variable c is a char type and is being assigned a value of 255, which is the maximum value that can be stored in a char . When 10 is added to this value, it will overflow and result in an undefined behavior.
To fix this bug, we can change the data type of c to an int . Also, we can use a typecast to avoid overflow while adding 10 to the value. Here's the corrected code:
#include
int main() { int c = 255; c = (int)c + 10; printf("%d", c); return 0; }
sir your teaching is excellent😀😀;
and sir please clarify my doubt,it would be very helpful😁.
In Q3 (at 6:47) ,if we exceed the maximum value, we comeback to zero ? why we are getting 9 as output
Ans..and explain
Char c =255;
C=c+10;
Printed("%d",c);
Sir for question no.5, I tried the following code with long int and therefore, the size of long int is 8 bytes. Theoretically, I should get an answer different from the one you got but still I got the same answer as you described. Why isn't long int considering 8 bytes rather just 4 bytes?
I have an doubt in same question... am just changing the second argument expression as i-j and i get 5,why? Instead of getting 4294967291
For ur doubt... May be ur computer holds 4 bytes for long int else long long int holds 8 bytes.
Sir in question 3 there would be default modifier signed and therefore the range would be -128 to +127 so it can't hold 255 I thought so, after watching your answer I get confused...clear this please.
Can you make a question, answer video of c++ programming exact this type sir
doubt:-
input=#include
int main()
{
printf("%d", printf("%s
","Hello world!"));
return 2;
}
output=
Hello world!
13
Process returned 2 (0x2) execution time : 0.750 s
Press any key to continue.
by adding"
" why are number of characters are increasing??please anyone answer my doubt
Thanking you sir
I learn something new...
But sir!!
Consider the code:
Printf("%10s","hello") it prints 5spaces and hello.
Printf("%1s","hello") it prints 4 characters but not 1 mentioned,i didn't understand that.
5:56 a char is capable of holding value upto 255, but when a char is declared it is signed by default right? Then the range should be from -128 to 127? Ughhhh someone help. This is so confusing!
Here in char,by default it behaves as unsigned.
Whereas in int,short or long they are signed.
Very nice and very useful thank you sir
Kya level question hain 🙌🙌
Hi sir, i have a doubt regarding q no:1 printf("%s","HELLO WORLD"); will print only HELLO right? ie till space is encountered? Answer should be HELLO 5 ??
Thank u sirr.....I lyk the way of ur teching
Thanks I learned something new!
Great effort sir....no words...for what u had made!!!!
your teaching is awesome
Thank you sir... Your teaching method is really nice and helpful.. U teach us more than others.. I gain smthing more by this video.. Tnx so much
5:48 dude, char is usually signed
int main()
{
int i=0;
while(i != 1)
printf("Awesome");
return 0;
}
Infinite loop
And core dumped
woah so nice questions. i appreciate it
Sir it means every negative no. Is present in 2scompement form in computer and that 2scomplement is equivalent to some positive value binary no.
Please sir kindly answer my question and your teaching is gratefull sir
awesome advanced questions on basics
U r always the best man
What is the meaning of
Thanku Neso for this amazing explanation.
Hello #NesoAcademy
In this video questions 2 where when we write %10s then it's priny five space before Hello
Buy when we write %5s then it's doesn't print any space before Hello.
Why?
ÇOĎÈ:
printf("%5s","Hello");
Hello Naman,
it is because '%10s' prints upto 10 places and '%5s' prints upto 5 places and word 'hello' consists of 5 letters.so it does give any space before Hello.
Hope This Helps You.
it does'nt give any spaces.i typed wrong before,sorry
the first answer might be wrong because %s scans only until when a space is encountered
No if we put characters in " " then that is treated as string
sir, with question 3, when i tried working out the mod on my calculator i keep getting 10, does that mean that 10 are the number of characters and 9 is the answer due to starting with 0?
Its veryy useful sir. Pls do more videos
Sir if printf also returns the no. Of characters it successfully prints on the screen then why don't we get 12 twice(once from the internal printf and other from external)??
Because they are two separate calls. It’s equivalent to writing
int tmp = printf( "%s", "Hello, World!" ); // returns 12
printf( "%d", tmp ); // returns 2
In question 5
After converting 3 to two's compliment we had only one zero .
If we had 2 zeros then how to subtract
Hi sir, I would like to ask a doubt in qs no. 4.
Is it okay to declare
i;
only instead of
int i;
?
Will the compiler implicitly assumes the datatype int to the statement?
printf("%10s","hello"); this will run in turboc too?
Yes