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 |
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
find simple interest & compund interest
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
main() { int i=5; printf("%d",++i++); }
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
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
which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
What are the files which are automatically opened when a C file is executed?
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number