Code for 1>"ascii to string"
2>"string to ascii"
Answer / riz
#include <iostream>
using namespace std;
int main()
{
char word[32];
int x = 0;
cout << "Please enter the word (maximum 32 characters):\n";
cin >> word;
cout << "The ASCII for this word is:\n";
while (word[x] != '\0') // While the string isn't at the end...
{
cout << int(word[x]); // Transform the char to int
x++;
}
cout << "\n";
return 0;
}
| Is This Answer Correct ? | 16 Yes | 0 No |
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
plz send me all data structure related programs
abcdedcba abc cba ab ba a a
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
13 Answers Intel, Microsoft, TCS,
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
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 to palindrom string in c language?
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];
Write a program that find and print how many odd numbers in a binary tree