1.

Given a word “COMPUTER”, write a C++ program to reverse the word without using any string functions.

Answer»

#include<iostream>

using namespace std; 

int main(() 

char a[9] = “COMPUTER”; 

inti; 

for (i=8; i>=0; i- -) 

cout<<a[i]; 

}



Discussion

No Comment Found

Related InterviewSolutions