Q1/Consider the C-programs below to determine the following requirements : 1- Write a brief description for each code line of the programs below? 2- Determine the output of the programs? 3- Suggest...


Q1/Consider the C-programs below to determine the following requirements : 1- Write a brief description for each code line of the programs below?
2- Determine the output of the programs?
3- Suggest question statement for the programs?
4- Fill the blanks in the code assigned with
blank1, blank2, blank3, blank4?


#include


 int  main()


{


    int i,n,a[100],SW,flag=0;


    printf("Enter the number of elements:\n") ;


    scanf("%d",&n) ;


     printf("Enter the elements\n") ;


    for(i=0;i<>


    {


        scanf("%d",&a[i]) ;


    }


    printf("Enter the element to be …
blank1
…..\n");


    scanf("%d",&SW);


        /*Perform…
blank2
…. operation*/


    for(i=0;i<>


    {


        if(a[i]==SW)


        {


            printf("Element %d …
blank3
… at %d  position \n",SW,i);


            flag=1;


            break;


        }


    }


    if(flag==0)


    {


        printf("Element %d …
 blank4
…….\n",SW);


    }


}



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here