English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

is it possible to do. if so write the program for me

2006-08-19 11:03:35 · 6 answers · asked by Anonymous in Computers & Internet Programming & Design

6 answers

Sounds like you want us to do your home work. So I will not give you a program that will do it. But if I was doing it I would try using a while loop

something like:

while( printf( (char)65 + (char)66 ) { }

this is just a starting point you will have to work on it from here

UPDATE:
Ok people are still saying it can't be done so here is the code to do it.

#include
void main( int arg, char *argv[] )
{
while( printf( argv[1] ) && false ) { }
}

No semi colon, no quotes. And if need be I could do it with out a command line parameter. (I just dont feel like looking up the ascii codes)

2006-08-19 13:32:47 · answer #1 · answered by Gregory Wurm 1 · 0 0

Not that I know of. The not using an array is the tricky part...a string (which would be neccisary to hold a name) needs to be an array of chars. I guess you could have a seperate variable for each letter. But then you're faced with actually calling some kind of output function which will need to be terminated with a semicolon. Sorry, I don't think it's possible, even using super god like macro power.

2006-08-19 11:49:10 · answer #2 · answered by Brian S 2 · 0 0

No way, semi colons to C are like period points to English. Without ever using quotes in C is also impossible.

2006-08-19 11:15:30 · answer #3 · answered by Andy T 7 · 0 1

first - you do need one semicolon, otherwise there's no way to do it.

second - figure out what each letter in your name is numerically. a quick way to find out - write a different program. a *very* basic version is the following:

---

main()
{
char name[4]="joe";
char i;

for(i=0;i<3;i++)
printf("%d ",name[i]);
}

---

let's assume you found out "joe" is 12 92 43. (which in reality it's not.) a very basic version of the program you could write is:

---

main()
{
cout << (char)12,(char)92,(char)43;
}

2006-08-19 14:09:46 · answer #4 · answered by Moxie1313 5 · 0 0

thier is no way at all, especially the semi colon

2006-08-19 11:55:11 · answer #5 · answered by Wish Master 5 · 0 0

/*-------hi dude: attempt this :its one hundred% good---------*/ /*-------it rather takes something to learn rules in c---*/ #comprise #comprise void substantial() { int a[5] = {a million,2,3,4,5}; int *i; for( i = 0; i<=4; i++) { printf("tp.c.d",*(a+i)); } getch(); }

2016-10-02 07:22:03 · answer #6 · answered by ? 3 · 0 0

fedest.com, questions and answers