On Wed, Aug 24, 2011 at 6:28 PM, Mehnaaz <[email protected]> wrote:

> #include <stdio.h>
> #define max 30
> int no_p;
> int main() {
>
>        char p[no_p][max];
>        char x;
>        int i=0;
>        printf("enter the no of productions..\n");
>                scanf("%d", &no_p);
>                printf("you have entered :%d\n", no_p);
>                printf("Variable who's FOLLOW you want\n");
>                scanf("%c", &x);
>

scanf(" %c", &x); // notice the space given here in scanf ... try this

>                printf("you have entered :%c",X);
>                printf("\n");
>                for( i =0 ; i< no_p ; i++){
>                printf("enter the production # %d",i+1);
>                scanf("%s",p[i]);
>                }
>                //follow(p,x);
> return 0;
> }
>
>
> the output i am getting goes like this
> ......................................
> enter the no of productions..
> 3
> you have entered :3
> Variable who's FOLLOW you want
> you have entered :
>
> enter the production # 1
> ...........................................
> at the line 4 of the output its supposed to wait for my scanf() entry
> value right??..but it executes the printf after that giving "you have
> entered"
>
> i'm using gcc to compile this
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Thanks and Regards
VIKAS SINGH
MCA- final year
NIT DURGAPUR
email:
 [email protected]
 [email protected]
http://smrit.wordpress.com

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to