True or false: If you continuously increment a variable, it
will become negative?
1) True
2) False
3) It depends on the variable type
Answers were Sorted based on User's Feedback
Answer / k sriharsha
It will not become negative if we use unsign data type.
Is This Answer Correct ? | 19 Yes | 3 No |
Answer / a programmer
It depends upon the variable type. Ex: if the variable is
declared as unsigned int then if we increment the value will
not become negative.
Is This Answer Correct ? | 10 Yes | 2 No |
Answer / sachin
after a limit of the variable ,it becomes -ve.
for ex:-
#include<stdio.h>
void main()
int i;
if(i<=32767)
{
printf("%d",i);
i++;
}
}after printing 1 to 32767,it tries to become 32768 which is
outside the limit,so it goes to the other side and become
-32768 and loops become indefinite.
Is This Answer Correct ? | 3 Yes | 0 No |
what is the difference between structural,object based,object orientd programming languages?
if p is a string contained in a string?
Why we use stdio h in c?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
write a program for odd numbers?
How can I find the day of the week given the date?
difference between native and cross compilers
1)what are limitations for recursive function? 2)write a program to read a text file and count the number of characters in the text file
write a addition of two no. program with out using printf,scanf,puts .
how logic is used
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
who is the father of C Language?
20 Answers CTS, UST,