i trace the code, why compiler didn't trace to capture %c... why... why.. help me someone pls..
--------
void main ()
{
char a, morechar;
do
{
clrscr();
printf("input a char :");
scanf("%c",&a);
printf("\nYr char is %c",a);
printf("\nInput more? Y/N ");
scanf("%c", &morechar);
}
while (morechar...
User Profile
Collapse
-
what's the problem here? why infinite loop???
-
i try the strlen just now... the program ok, no problem but new prob appear.
i have prob with this short prog (eample), output doesn't capture any Y or N char.... why ? and how to correct it?
char answer;
do
{ //some instruction goes here
printf("Are u sure to checkout ?Y/N ");
scanf("%c",&ans wer);
}
while((answer != 'N') || (answer != 'n'); -
yep.. yr code looks complicated.. not really understand.. can u check this example? how the array length is not 6 as i declared?
#include <stdio.h>
#include <string.h>
main ()
{
char a[8];
int size;
clrscr();
printf("Input1 : ");
scanf("%s",&a);
length = strlen(a);
printf("\nlengt h this input is = %d",length);...Leave a comment:
-
how to check whether input from user minimum/maksimum example for password
i try to limit the user key in integer at least 1 and not more than 8. pls help me..
No activity results to display
Show More
Leave a comment: