Area of a Triangle Using Command Line Arguments

Note: Please go through Command Line Arguments Post before preparing for these questions. The theory there  for TCS command line Program will help you in better understanding .

For other topics on Quants, Verbals and Reasoning asked in TCS Placement Papers visit Main Dashboard.

#include <stdio.h>

int main(int argc, char *argv[])

{

int base, height;

float area;

base = atol(argv[1]);

height = atol(argv[2]);

area = base*height/2;

printf("%f",area);

}