Shopaps
Display the ASCII characters. (Implement in do-while loop) with functions
Delete
Share
This Question is Closed
annas
Best Response
You've already chosen the best response.
1
can you show me what code you have done
annas
Best Response
You've already chosen the best response.
1
and is it in C or java
Shopaps
Best Response
You've already chosen the best response.
0
c
annas
Best Response
You've already chosen the best response.
1
ok
Shopaps
Best Response
You've already chosen the best response.
0
help me please
T_T
annas
Best Response
You've already chosen the best response.
1
ok give me a min
annas
Best Response
You've already chosen the best response.
1
do you want to print all characters ?
Shopaps
Best Response
You've already chosen the best response.
0
yah
thats what our teachers said
Shopaps
Best Response
You've already chosen the best response.
0
T_T
annas
Best Response
You've already chosen the best response.
1
#include<stdio.h>
#include<conio.h>
void main()
{
char c=0;
while(c<255)
printf("\n%d ascii value is %c",c,c);
c=c+1;
}
annas
Best Response
You've already chosen the best response.
1
its in while loop can you convert it in to do while() loop?
Shopaps
Best Response
You've already chosen the best response.
0
i dont know
Shopaps
Best Response
You've already chosen the best response.
0
T_T
annas
Best Response
You've already chosen the best response.
1
ok
annas
Best Response
You've already chosen the best response.
1
#include<stdio.h>
#include<conio.h>
void main()
{
char c=0;
do{
printf("\n%d ascii value is %c",c,c);
c=c+1;
}while(c<255);
getch();
}
//in function form:
#include<stdio.h>
#include<conio.h>
void ascii(void){ //function
char c=0;
do{
printf("\n%d ascii value is %c",c,c);
c=c+1;
}while(c<255);
}
void main()
{
ascii();
getch();
}
annas
Best Response
You've already chosen the best response.
1
understand???
Shopaps
Best Response
You've already chosen the best response.
0
ill try it in turbo c
annas
Best Response
You've already chosen the best response.
1
yes try it. if an problem occurs tell me ok :)
annas
Best Response
You've already chosen the best response.
1
this one is the proper answer to your question program with function + do_while loop
//in function form:
#include<stdio.h>
#include<conio.h>
void ascii(void){ //function
char c=0;
do{
printf("\n%d ascii value is %c",c,c);
c=c+1;
}while(c<255);
}
void main()
{
ascii();
getch();
}
Shopaps
Best Response
You've already chosen the best response.
0
bro, their is an error occur constant out of range in comparison in function what to do?
Shopaps
Best Response
You've already chosen the best response.
0
in this part "while(c<255);"
annas
Best Response
You've already chosen the best response.
1
ok lemme see
annas
Best Response
You've already chosen the best response.
1
oh its not error its a warning. but its ok program is working accurately. warning is because 255 is a huge number no worries its ok
Shopaps
Best Response
You've already chosen the best response.
0
your right i tryied lesser value it works..
Shopaps
Best Response
You've already chosen the best response.
0
thanks a lot bro got many more problems.. T___T
annas
Best Response
You've already chosen the best response.
1
mention not i like to help :)
Shopaps
Best Response
You've already chosen the best response.
0
ill post it