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 |
Explain the concept of "dangling pointers" in C.
What is a program flowchart and explain how does it help in writing a program?
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran
How to develop software using "c" programming?
what are brk, sbrk?
without using arithmatic operator convert an intger variable x into x+1
Explain Doubly Linked Lists?
What does return 1 means in c?
to get a line of text and count the number of vowels in it
What is the code in while loop that returns the output of given code?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
to get a line of text and count the number of vowels in it