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 self-referential structure in c programming?
if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.
18 Answers Parexel, Ram Infotech, Zycus Infotech,
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
main() { float a=8.8; double b=8.8; if(a==b) printf("Equal"); else printf("not equal"); getch(); } what is the output? with reason
How to print India by nested loop? I IN IND INDI INDIA
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
Method Overloading exist in c ?
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
Main must be written as a.the first function in the program b.Second function in the program c.Last function in the program d.any where in the program
19 Answers CTS, HCL, TCS,
char p="data"; printf(p);
to find the closest pair
write a program to swap two numbers without using temporary variable?