Short int and int

What is the difference between short int and int?

Answered by: jbode on: Feb 11th, 2012

The general idea is that short "always" represents a 16-bit integer, whereas int represents whatever the native word size is for that particular architecture (16- or 32-bit). "Always" is in scare quo...

Answered by: sumit on: Feb 5th, 2012

Sorry to say that actually in most of C compiler short int is also of 16 bit and they are equivalent to each other.

Recursive function

1. Find output for following recursive function :int main(){int i=32242,j=find(i);}int find(int j){if(j){j = j%10 + find(j/10);printf(" %d ",j);}return j;} 2. What is the problem with following code : char* addnewlinetostring(char *s){char buffer[1024];strcpy(buffer,s);buffer[strlen(s)-1] = 'n';return...

Answered by: battlenexustnmt on: Mar 15th, 2011

The answer is 3  5 7 11 13

Answered by: windows_pal on: Aug 17th, 2008

Output of a++ + ++a + a++

What is the answer of a++ + ++a + a++ int a=5;c = a++ + ++a + a++;//compiler produces the answer 28!!!//how

Answered by: peter on: Mar 25th, 2012

Which operation in the following expression will be performed first?

c = a++ / b + 5;

Answered by: Asarudeen on: Feb 9th, 2012

c = a++ + ++a + ++a Compiler starts from leftmost operand

```Code1+5 = 6

a = 6

1+6 =7

a = 6+7

a =13

1+13 =14

Now

c = 6+ ++7 ++13

c = 28```