Skip to main content

Array Using


Write a C program using array compared  two array the value.
                  Array


#include<stdio.h>
int main (){
    int a[5],b[5],i ,flag;
    printf("enter the 5 value of a :");
    for( i=0;i<=4;i++)
    scanf("%d",&a[i]);
    printf("enter the 5 value of b :");
    for( i=0;i<=4;i++)
    scanf("%d",&b[i]);
    for ( i = 0; i <=3; i++)
    if (a[i]==b[i])

    {
       flag = 1;
     printf("%d",flag);
      /* code */
    }else flag =0;
   
    printf("%d",flag);

    return 0;
   

}

Comments

Popular posts from this blog

Coding Tips

Ji Ha dosto mai aapko coding ke 10 Tips dunga                     1. Shuruwat Dhire Se Kare:    Coding seekhne mein patience bahut important hai. Aap dheere-dheere shuruat karein, jaldi results expect na karein. 2. Basic Concepts Samjhe:   Programming ke basic concepts ko samajhna sabse important hai. Variables, loops, conditions, aur functions ke basic concepts ko acche se samjhein. 3. Practice Regularly:   Regular practice se aapki coding skills improve hongi. Daily coding karein, even agar chhota project bhi ho. 4. Kisi Ek Language Par Focus Karein:   Ek programming language par focus karein, jaise ki Python, Java, ya JavaScript. Pehle ek language ko acche se samajhne mein time lag sakta hai. 5. Online Tutorials Aur Courses Le: Internet par bahut se free aur paid tutorials available hain. Inse coding ke fundamentals aur advanced topics ko learn kar sakte hain. 6. Debugging Seekhein:   ...