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 |
how to use showbits function?
Are the variables argc and argv are local to main?
Write a program to print the prime numbers from 1 to 100?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
ATM machine and railway reservation class/object diagram
write a program to search for an element in a given array. If the array was found then display its position otherwise display appropriate message in c language
i want explaination about the program and its stack reprasetaion fibbo(int n) { if(n==1 or n==0) return n; else return fibbo(n-1)+fibbo(n-2); } main() { fibbo(6); }
Combinations of fibanocci prime series
What are control structures? What are the different types?
Program to write some contents into a file using file operations with proper error messages.
Write a program to reverse a given number in c?
What does 3 mean in texting?