why the range of an unsigned integer is double almost than
the signed integer.
Answer / srinivasu
By default int is declared as unsigned integer.It's range is
0 to 65535.Signed integer range is -32767 to 32768.
A variable declared as Unsigned int doesn't holds a negative
value whereas a signed integer does.So signed and unsigned
integer doesn't differ in the range, but in the kind of
value it holds.
| Is This Answer Correct ? | 3 Yes | 0 No |
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(“%u %u %u %d \n”,a,*a,**a,***a); printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1); }
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); }
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
main() { char a[4]="HELL"; printf("%s",a); }
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }