Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how can i cast a char type array to an int type array

Answers were Sorted based on User's Feedback



how can i cast a char type array to an int type array..

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

how can i cast a char type array to an int type array..

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

Post New Answer

More C Code Interview Questions

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

1 Answers   HCL,


main() { extern out; printf("%d", out); } int out=100;

1 Answers  


main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 Answers  


write a program to Insert in a sorted list

4 Answers   Microsoft,


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

1 Answers  


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  


main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


What is "far" and "near" pointers in "c"...?

3 Answers  


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; } }

2 Answers   CSS, Wipro,


write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


Categories