[ create a new paste ] login | about

Link: http://codepad.org/aAdu4Nmo    [ raw code | output | fork ]

C++, pasted on Nov 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;
 
int main ()
{
   string texts[] = {"Apple", "Banana", "Orange"};
   for( unsigned int a = 0; a < sizeof(texts); a = a + 1 )
   {
       cout << "value of a: " << texts[a] << endl;
   }
 
   return 0;
}


Output:
1
2
3
4
5
value of a: Apple
value of a: Banana
value of a: Orange

Segmentation fault


Create a new paste based on this one


Comments: