SlideServe
Menu
Préférences
© SlideServe · v2026

Comprehensive Review of Arrays, Pointers, Dynamic Memory Allocation, Strings, File I/O, Structures, and Classes

tulia avatar
9 diapositives · 247 Views · Sep 06, 2014

This document provides an extensive review of key programming concepts including arrays, pointers, dynamic memory allocation, strings, file input/output (I/O), structures, and classes in programming languages like C++. It covers fundamental questions such as what arrays are, how pointers work, the importance of dynamic variables, and the significance of structures and classes. Additionally, it explores string manipulation, stream handling, and the relationship between classes and objects. This review serves as a valuable resource for understanding these critical programming topics.

Comprehensive Review of Arrays, Pointers, Dynamic Memory Allocation, Strings, File I/O, Structures, and Classes - slide 1
01 / 9Comprehensive Review of Arrays, Pointers, Dynamic Memory Allocation, Strings, File I/O, Structures, and Classes
1 / 17

Télécharger la présentation

Comprehensive Review of Arrays, Pointers, Dynamic Memory Allocation, Strings, File I/O, Structures, and Classes
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Test 1 Review

  2. Arrays • What is an array? • What is name of the array? What is index? • What is indexed variable? Element of the array? • What is array size? • What is array’s base type? • How is array declared? • What do number indexes start from? • Can compiler detect an out-of-range index? • Can arrays be passed as arguments to functions? If yes by value or by reference? If yes, how’s size of array passed? • What does const mean in the following declaration? void myfunc(const int []);

  3. Pointers • What is variable address, name, value? • What is a pointer? • How is a pointer declared? • What is address-of and dereference operators? • How can a pointer be assigned a value? • How can a value of a memory location referred to by a pointer be accessed? • What is a constant pointer? What is a pointer to a constant? • What is the relationship between array name and a pointer? • What is null pointer? What is lose pointer problem? • Can pointers be used with objects? How can a method be invoked on an object using pointer? • What is -> operator?

  4. Dynamic memory allocation • What is static and dynamic variables? Why are dynamic(ally allocated) variables needed? • What is a heap? how is it used? • What is new and delete operations? How are they used? • How does one access a dynamically allocated variable? How does one assign a value to such variable at declaration time? • How can a pointer be passed to a function? • How does one create an array dynamically? • How to release memory?

  5. Review on Strings • which header file needs to be included for string manipulation? • how’s a string assigned a value? Can a string be initialized at declaration? • what’s the difference in string input between getline() and extraction operator? • how are strings compared, concatenated? • how can the size of a string be determined?

  6. File I/O • what is stream? • what is the difference between input stream and output stream? • how can a stream be defined? • what do the following functions do? • open()close() • c_str() eof()fail()exit() • can a stream be passed as a parameter?

  7. Structures • what’s a structure? what’s the keyword to define a structure? • what are structures used for? • is a structure definition an executable statement? Can it be put in a header file? • why includeing a header file with structures definition multiple times is a problem? how is this problem solved? • what are #define #ifndef #endif? • what is a structure variable? • how are elements of a structure called? • do elements of the same structure (different structures) have to have unique names? • how can structures be initialized? what happens when one structure variable is assigned the value of another? • can structures be passed as parameters? by value? by reference? can a function return a structure?

  8. Classes • What is class? What is object? • What is the difference between object and class? What do we mean when we say object belongs to a class? • What’s member variable? Member function? Method? Attribute? Data member? • What’s an in-line function? • What are these operators used for? “.” “::” • What is the difference between public and private members of class? • What is the state of an object?

  9. Classes (cont.) • What is mutator? Accessor? How’s accessor function distinguished? • What is constructor? What is the name of constructor? • How many parameters can constructor take? Can there be more than one constructor? What is void constructor? • What is the return value of constructor? • What is destructor? • What is overloading member functions?