CStrings - cout<< strcmp(first,last<< endl...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <iomanip> #include <cstring> using namespace std; int main() { char first[] = "Eric" ; char last[] = "Van Wyk" ; char full[50] = ""; if (strcmp(first,last)) { cout << "The strings are not the same." << endl ; } else { cout << "The strings are the same." << endl ;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } cout << strcmp(first,last) << endl ; strcat(full,first) ; strcat(full," "); strcat(full,last) ; cout << "My full name is: " << full << endl ; cout << "The length is " << strlen(full) << endl ; }...
View Full Document

This note was uploaded on 10/28/2010 for the course CSCI 1113 taught by Professor Staff during the Spring '08 term at Minnesota.

Ask a homework question - tutors are online