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 |
main() { extern int i; i=20; printf("%d",sizeof(i)); }
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
how to concatenate the two strings
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
#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); }
You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,
how to return a multiple value from a function?
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.