Declare an Array with the identifier SUBJECT having length 5-02185
This subjective question is related to the book/course vu mkt501 Marketing Management. It can also be found in vu mkt501 Mid Term Solved Past Paper No. 1.
Question 1: Declare an Array with the identifier SUBJECT having length 5.
Assign following values to the array elements:
MIS, Java, Algorithms, Databases, C++
Show all values in reverse order.
x[0]="MIS";
x[1]="Java";
x[2]="Algorithms";
x[3]="Databases";
x[4]="C++";
x.reverse();
x.sort();for ( k = 0 ; k < x.length; k = k + 1 ) {
document.write(x[k] + "<BR>");
}
Assign following values to the array elements:
MIS, Java, Algorithms, Databases, C++
Show all values in reverse order.
Answer:
x= new array(5);x[0]="MIS";
x[1]="Java";
x[2]="Algorithms";
x[3]="Databases";
x[4]="C++";
x.reverse();
x.sort();for ( k = 0 ; k < x.length; k = k + 1 ) {
document.write(x[k] + "<BR>");
}