Skip to main content

Data Structures Using C for you


Data Structures Using C is a module book for you. After working through this module you should be able to create and use new and complex data types within C programs.

Learning objectives

After working through this module you should be able to:

  1.  Manipulate character strings in C programs.
  2.  Declare and manipulate single and multi-dimensional arrays of the C data types.
  3.  Create, manipulate and manage C pointers to data elements.
  4.  Create and manage complex data types in C.
  5.  Use unions to define alternate data sets for use in C programs.
  6.  Allocate memory to variables dynamically.
  7.  Manipulate characters and bits.
Content of this module:
  • Strings.
  • Arrays.
  • Pointers.
  • Data definitions – Structures.
  • Data definitions – Unions.
  • Dynamic allocation of data
  • Character and bit manipulation



Comments

Popular posts from this blog

Object-Oriented Programming and JAVA Programming Language

  Object-Oriented Programming and:   Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, olymorphism, and inheritance. Many modern programming languages now support OOP, at least as an option. JAVA Programming Language: Object-oriented programming is at the core of Java. In fact, all Java programs are object-oriented, this isn’t an option the way that it is in C++, for example. OOP is so integral to Java that you must understand its basic principles before you can write even simple Java programs. Therefore, this chapter begins with a discussion of the theoretical aspects of OOP.

Compilation Process of a C++ Program

Compiling a C++ program involves a number of steps (most of which are transparent to the user): · First, the C++ preprocessor goes over the program text and carries out theinstructions specified by the preprocessor directives (e.g., #include ). The result is a modified program text which no longer contains any directives. · Then, the C++ compiler translates the program code. The compiler may be a true C++ compiler which generates native (assembly or machine) code, or just a translator which translates the code into C. In the latter case, the resulting C code is then passed through a C compiler to produce native object code. In either case, the outcome may be incomplete due to the program referring to library routines which are not defined as a part of the program. For example, Listing 1.1 refers to the << operator which is actually defined in a separate IO library. · Finally, the linker completes the object code by linking it with the object code of any lib...

Importance of function

Function is much important when we have to do a long project. Let we have a math function (sum, sub,mul etc.) in our project we need the same calculation several times. if we have a function. We can do it by a single line (by calling the function). Otherwise we will have to rewrite the same code of calculation again. And function got arbitrarily long.