Question: DEBUGING IN C LANGUAGE Program 3: int element(int arr[], int num) { in i, ele; ele = arr[0]; for (i = 1; i < num;

DEBUGING IN C LANGUAGE

Program 3:

int element(int arr[], int num)

{

in i, ele;

ele = arr[0];

for (i = 1; i < num; i++)

if (arr[i] > ele)

ele = arr[i];

return ele;

}

main()

{

arr[] = {1, 24, 145, 20, 8, -101, 300};

int n = sizeof(arr)/sizeof(arr[0]);

printf("element of array is %d", element(arr[], n));

}

  1. 24
  2. 145
  3. -101
  4. 300

Program 4:

main()

{

int m,n;

for(i 0; i << 5; i++)

{

printf("\t\t\t\t");

for(j 0; j << 5; j+++)

printf("*");

printf("/n");

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!