Connecting...

This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Introduction to C++
For more information, please see full course syllabus of Introduction to C++
Introduction to C++ Arrays & Pointers
Lecture Description
In this lesson, our instructor Alvin Sylvain gives an introduction to arrays and pointers. He starts by discussing using a chunk of memory. He then goes on to declaring an array, selecting an element from array and multi-dimensional array. Next, our instructor discusses compile-time and character string initialization, pointers and pointer arithmetic, referencing and dereferencing, and function call-by reference. Lastly, he touches on array of pointers.
Bookmark & Share
Embed
Share this knowledge with your friends!
Copy & Paste this embed code into your website’s HTML
Please ensure that your website editor is in text mode when you paste the code.(In Wordpress, the mode button is on the top right corner.)
×
Since this lesson is not free, only the preview will appear on your website.
- - Allow users to view the embedded video in full-size.
Next Lecture
Previous Lecture
1 answer
Sun Oct 30, 2016 2:27 PM
Post by ALI SAAD on January 6, 2016
Is there any plan to do Data structure lectures?
1 answer
Sun Sep 28, 2014 3:41 PM
Post by Ram Manohar Oruganti on September 23, 2014
What's the advantage of using new and delete over normal array allocation?
1 answer
Fri Feb 7, 2014 6:29 PM
Post by Ram Manohar Oruganti on February 7, 2014
char name[10] = {'a','b','c','d','e','f','g','h','i','\0'};
cout<<name<<endl; //prints abcdefghi
char name[10] = {'a','b','c','d','e','f','g','h','i','j'};
cout<<name<<endl; //prints abcdefghij and some garbage values
So is the null terminator an indicator to the arry to stop raing from the next memory location? Would it continue reading until it encounters a null terminator? Thanks in advance.
3 answers
Sun Jun 30, 2013 10:27 AM
Post by Brandon Oakley on June 27, 2013
Hey Allan, I was doing pretty good in this course with the homeworks up until this problem set (arrays and pointers).. I hit a road block as I can't even program the first one for some reason.. I don't know if its because I am trying to initialize arrays wrong or.... Anywho, could you possibly offer a solution/ plan of attack template that will aid me in solving this homework? I am trying to move on with the course but I feel as though if I cannot get a grasp on this then whats the point of trying what is ahead
2 answers
Last reply by: Katenderi Mohamed
Wed Jul 18, 2012 4:41 AM
Post by Katenderi Mohamed on July 17, 2012
I have this game but I am not sure how to start writing its code, please can you help me out?
This function is required for the 'GAME' programming project in *
* This ffunction: *
1. Checks the board[][] array for a winner and returns
PLYR_TOKEN if player has won
COMP_TOKEN if computer has won
NONE if there is no winner yet
2. Analyses the current status of the game and determines priority values for each unoccupied place on the board and 'stores these in an array called place_val'.
3. Requires place_val to be passed to it.