Click To Get Off-Campus Placement Jobs Info !!!
Program Discussion :: Basics
Home > Programs > Basics

1 / 244

Write a program to print next to the last word of a sentence.

Answer:

#include<iostream>
using namespace std;
int main(){
    int t;
      cin>>t;
            while(t--){
               cin.ignore();
              char str[100];
               int l=0;
             char nstr[100];
                cin.getline(str,100);
                    for(int i=0;str[i]!='\0';i  ){
                         l  ;
                    }
                 int k=0,j=0;
                  for(int i=l;i>=0;i--){

                            if(j==1

Asked In :: IBM TCS Virtusa eLitmus

Post Your Answer Here:

Name *
Email

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:



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:



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:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here:



Language:

Post Your Reply Here: