User Profile
Collapse
-
thanks you so much buddy.... My doubts are very much cleared now...thanks one again -
Is it?... I am using tubo C++ version 3 and yours is visual studio.Each one is responding one type for the same coding. So it must be depending on the software used to run the program I guess.anyways thanks a lot.Leave a comment:
-
I know that...but my question is different. If the data type is integer then the maximum value the memory can,hold is 32767 for which the binary is 011111111111111 1.but in my program the variable c which I use to store the result is of long int data type. In that case numbers greater than 32767 can easily be stored right?... Yet the result is -32768...why????Leave a comment:
-
Is adding two integer and store the result in long int possible?
In a program which adds two numbers of integer data type and prints the result, numbers greater than 32767 can neither be given as input nor obtained as output.
for eg:
if the operends are a and b and the result is c
neither a nor b nor c can be greater than 32767.now look at the below program
#include<iostre am.h>
void main()
{
int a,b;
long int c;
cin>>a;
cin>>b;... -
Thank you much.....the first half of my question is answereds clearly...i really wonder if you could answer the second half too..Leave a comment:
-
String is getting printed even after the size of array is exceeded
#include<iostre am.h>
#include<conio. h>
void main()
{
clrscr();
char name[5];
cout<<"Enter your name";
cin>>name;
cout<<"Your name is"<<name;
getch();
}
In the above program the size of the array of the variable name is 5. which means the variable cant store more than 5 characters.
which also means...
No activity results to display
Show More
Leave a comment: