Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



True or false: If you continuously increment a variable, it will become negative? 1) Tru..

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 ?    7 Yes 2 No

True or false: If you continuously increment a variable, it will become negative? 1) Tru..

Answer / k sriharsha

It will not become negative if we use unsign data type.

Is This Answer Correct ?    4 Yes 1 No

True or false: If you continuously increment a variable, it will become negative? 1) Tru..

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

True or false: If you continuously increment a variable, it will become negative? 1) Tru..

Answer / sneha

it depends on the variable type

Is This Answer Correct ?    2 Yes 0 No

True or false: If you continuously increment a variable, it will become negative? 1) Tru..

Answer / hussain reddy

3

Is This Answer Correct ?    1 Yes 0 No

True or false: If you continuously increment a variable, it will become negative? 1) Tru..

Answer / ruchi

True

Is This Answer Correct ?    1 Yes 1 No

True or false: If you continuously increment a variable, it will become negative? 1) Tru..

Answer / k.kavitha

2) false

Is This Answer Correct ?    3 Yes 6 No

Post New Answer



More C Interview Questions

What are the storage classes in C?

0 Answers  


While(1) { } when this loop get terminate is it a infinite loop?

5 Answers  


Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d

1 Answers   TCS,


what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void main() { int i,j=5; i=cube(j+3); printf("i=%d",i); }

6 Answers   IBM,


What is zero based addressing?

0 Answers  






 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

0 Answers  


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

0 Answers  


struct node { int *a; char *b; char array[12]; }; struct node m,*n; assign the value in *a,*b,char array[12]

3 Answers  


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

0 Answers   Wipro,


what is the significance of static storage class specifier?

0 Answers  


What is difference between && and & in c?

0 Answers  


write a program that will print %d in the output screen??

8 Answers   Infosys,






Categories