OK SIMPLE CODE WITH AN ARRAY THAT I NEED TO DECLARE THE SIZE TO 16 AND OUT PUT A-P FORWARD AND BACKWARDS IN CAN ONLY GET IT TO WORK IF I DECLARE IT TO SIZE 17 BUT WONT WORK IF SIZE IS 16?????? I NEED IT TO WORK WITH SIZE 16. WHAT AM I DOING WRONG???
#include<iostream>
using namespace std;
void reverse_string(char*);
int main()
{
const int size=16;
char myarr[size]="abcdefghijklmnop"; // THIS IS WHERE MY PROBLEM IS
what? i know the array has a null zero that's why if i make the size 17 it will work. but im having trouble doing this with size=16. i think i need a for loop to initialize the array A-P, but what ive tried just didn't work. or i could just be wrong all together. i dont know how to do this. and im not sure what a code tag is.