how to find your architecture is LittleEndian or BigEndian?
Answer / kirankumaryakkala
ans. by using unions we can find it see.
union
{
char ch[2];
int i;
}u;
u.i=512;
printf("%d %d",u.ch[0],u.ch[1]);
printf("%d",u.i);
basically u will see this type of implementation while u r
going through some C books.
depending on the storage seen at ch[0],ch[1] u can find.
u can find the output as ch[0]=0,ch[1]=2 \\little endian
(or) ch[0]=2,ch[2]=0\\bigendian
like this u can find the endian....
| Is This Answer Correct ? | 3 Yes | 1 No |
What does. int *x[](); means ?
What is main () in c language?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What is pointers in c?
What is the mean of this statement:: if(int i=0 * i=9)
Write a program to show the change in position of a cursor using c
SRUCTURE PROGRAMMING
What header files do I need in order to define the standard library functions I use?
What is a newline escape sequence?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is maximum size of array in c?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..