[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

312 / 279

Write a program using command line argument to input a string and print the string in reversed order..

Answer:

#include
int main()
{
    char a[50];
    int l,i=0,j,temp;
    printf("Enter A String: ");
    gets(a);
    for(l=0;a[l]!='\0';l++); 
             // to determine length of String
    j=l-1;   // l is the length of String
    for(i=0;i

Asked In :: TCS

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here: