[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Program Discussion :: Basics

Home > Programs > Basics

317 / 279

Write a C program using command line arguments which will take numbers as input and Find the average of the numbers.

Answer:

#include 

int main(int argc, char * argv[])
{
    int  sum = 0,i = 1,count = 0;
    if(argc == 1)
    {
         printf("Enter the number \n");
         exit(1);
    }
    count = argc - 1;
    while (i 

Asked In :: TCS

Post Your Answer Here:

Language:

Post Your Reply Here: