Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. //DRIVER.CPP
  2.  
  3. #include <iostream>
  4. #include "/user/cse232/Projects/project07.string.h"
  5.  
  6. using namespace std;
  7.  
  8. int main(){
  9.     char cstring1[17]={'0',1,'2','3','4','5','6','7','8','9','b','c','d','e','f','g','\0'};
  10.     double dstring1[5]={0,1,2,3,4};
  11.     String str(cstring1);
  12. cout<<sizeof(cstring1)<<endl;
  13.     cout<<(cstring1[2]==2)<<"Penguins"<<cstring1[2]<<"Nopenguins"<<endl;
  14.      cout<<(dstring1[2]==2)<<"Penguins"<<dstring1[2]<<"Nopenguins"<<endl;
  15.  
  16.  
  17.  
  18. /*  for(unsigned idx=0;idx<sizeof(cstring1);idx++){
  19.         cout<<"Inside for loop lulz"<<endl;
  20.         cout <<"cstring1:"<<*cstring1[idx]<<"\t str: "<<*str[idx]<<endl;
  21.     }
  22. */
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement