lundi 29 juin 2015

copy an array element to another array in c without using semicolon


        #include <stdio.h>



void main( int a ,int b,char c[99],int i,int j,int i1,int j1 ,char tempvar[99],char temparray[99])
        {
        if (b=0){}

        if (scanf("%d",&a)){if(a<100 && a>0){while(b<a){if(scanf("%s",c)){

        if(i=0){}
        if(j=0){}
        while (c[i]!='\0'){
        if (c[i]!='*'||c[i]!='+'||c[i]!='-'){

        if(i1=0){}
        if(j1=0){}

        if(tempvar[i1]=c[j1]){}


        printf("%c",tempvar[i1]);
        }



    else if(0){}


    if(i=i+1){}
    }//while end



     }if(b=b+1){}
    }}} //complete asking


    }//voidmain

Here i want to copy the element of c array to tempvar array elementwise but getting compiler stuck .if i remove "if(tempvar[i1]=c[j1]){}" this line then my output become

take input like :

2 (number of time user will input)
1*5 (string value tobe iserted)
2*7 (string value tobe iserted)

outpt

iiii

cant understand how to copy the elements


Aucun commentaire:

Enregistrer un commentaire