Which of the following codes run(s) in \(O(1)\)?
A:
 for (int i=0; i<n; i++){
int sum=0;
for (int j=0; j<n; j++){
sum+=A[i][j];
}
cout<<sum;
return;
}

B:
 for (int i=0; i<n; i++){
int sum=0;
for (int j=0; j<n; j++){
sum+=A[i][j];
cout<<sum;
break;
}
}

C:
 for (int i=0; i<n; i++){
int sum=0;
for (int j=0; j<n; j++){
sum+=A[i][j];
cout<<sum;
return;
}
}

D:
 for (int i=0; i<n; i++){
int sum=0;
for (int j=0; j<n; j++){
sum+=A[i][j];
}
cout<<sum;
break;
}
