how can i cast a char type array to an int type array
Answers were Sorted based on User's Feedback
Answer / moolshankershukla
int a[10];
char b[10];
a[10]=(char) b[10]; // type casting char type into int type.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / harish
int b[10];char a[10];
for(int i=0;i<10;i++)
b[i]=(int)a[i];
| Is This Answer Correct ? | 1 Yes | 0 No |
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error
main() { extern out; printf("%d", out); } int out=100;
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
write a program to Insert in a sorted list
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
Is the following code legal? typedef struct a { int x; aType *b; }aType
Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
What is "far" and "near" pointers in "c"...?
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
write a program to count the number the same (letter/character foreg: 's') in a given sentence.