Issue with Challenge #1

+1 Aly Abdelrahman · November 7, 2014
This is sort of an outline of my code not completed i know it looks like a mess but i keep getting this error saying 

"warning passing argument 1 of 'isdigit' makes integer from pointer without a cast 

and same for isupper and dollar sign 





#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

int main(){

char pass [20];
int i, f=0, g=0 , dollar=0;

printf("password checker !!\n");
scanf(" %s", &pass);

for ( i=0 ; i<20 ; i++){

    if ( isdigit(pass))
        f++;


    else if ( isupper(pass))
        g++;


    else if( pass == '$')
        dollar++;

}
if (  f>0 && g>0 && dollar>0 )
    printf("valid pass");




return 0;
}

Post a Reply

Replies

Oldest  Newest  Rating
0 Jack Chuge · November 7, 2014
you just create one counting variable which is i, but however, you implement more increments than the counting varianble you give. that's the matter.
0 Aly Abdelrahman · November 7, 2014
Sorry I'm not sure I understand what you mean by that
0 You knees · November 10, 2014
you had a problem with the syntax in your condition. you lack some grouping symbols

This would help.
/images/forum/upload/2014-11-10/7fe21f279f5b2aca1c9469560d08d112.PNG
  • 1

C

107,258 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator