edited by
446 views
0 votes
0 votes

Let arr[] be an array containing n integers. The following algorithm computes the frequency of each element in arr and stores it in another array fre[].

for(i=0;i<n;i++)
{

   count=1;
   for(j=i+1;j<n;j++)
   {  
         if(c)
          {  
             count++;
             fre[j]=0;
           }
    }
    if(fre[i]!=0)
     { 
        fre[i]=count;
      }
 }

Choose the correct expression for C

$A) arr[i]<=arr[j]$

$B) arr[i]>=arr[j]$

$C) arr[i]!=arr[j]$

$D) arr[i]==arr[j]$

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
3 answers
1
hrcule asked Jul 20, 2018
613 views
Int A[3]={0,1,2}A++; For this code snippet un C will there be a compilation error,if yes then please explain a bit.
0 votes
0 votes
2 answers
2
hrcule asked Jul 8, 2018
1,314 views
Main(){Int a[3][4]={(1,2,3,4),(5,6,7,8),(9,10,11,12)}Print("\n%u%u%u",a[0]+1,*(a[0]+1),*(*(a+0)+1)));}What will be the output if base address is 10.
4 votes
4 votes
1 answer
3
0 votes
0 votes
2 answers
4
vishalmessi asked Dec 11, 2016
4,106 views
#include <stdio.h int main() { int a[][3] = {1, 2, 3, 4, 5, 6}; int (*ptr)[3] = a; printf("%d %d ", (*ptr) , (*ptr) ); ++ptr; printf("%d %d\n", (*ptr) , (*ptr) ); return ...