1. Write a program to reverse the contents of an array.
2. Write a program which accepts a parenthesized arithmetic expression as input and prints “balanced” if the parenthesis in the expression are matched else prints “unbalanced”.
Ex: a= ((b+c)+e)*d = balanced
a=(b+c)e)*d, a = ) = unbalanced
3. Write a program which returns true if each item in an array is unique else returns false
long startTime = System.currentTimeMillis(); // Number of millisec from Jan 1st 1970
.....your program....
long endTime = System.currentTimeMillis();
long totalTime = endTime - startTime;
System.out.println(totalTime);
Time calculation – C
1. Compile your program
$cc <filename.c>
2. Run your compiled program as follows
$time ./a.out