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 |
why the range of an unsigned integer is double almost than the signed integer.
Is it possible to type a name in command line without ant quotes?
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
String reverse with time complexity of n/2 with out using temporary variable.
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
what is the code of the output of print the 10 fibonacci number series
How will u find whether a linked list has a loop or not?
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
Sir... please give some important coding questions asked by product companies..
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,