Sie sind auf Seite 1von 4

Introduction to C and C++

1) Explain the three types of looping structures available in C ?


Ans:

http://www.programiz.com/c-programming/c-for-loop

http://www.cprogramming.com/tutorial/c/lesson3.html
http://www.circuitstoday.com/control-structures-in-c-and-cpp
Simple answer : http://fresh2refresh.com/c/c-loop-control-statements/
2) Define an array in C language. Explain the types of arrays with examples.
Ans: http://www.programiz.com/c-programming/c-arrays
http://www.cprogramming.com/tutorial/c/lesson8.html
http://fresh2refresh.com/c/c-array/ looks good too
http://www.tutorialspoint.com/cprogramming/c_arrays.htm
3) Discuss the three types of functions with suitable exaples
Ans http://fresh2refresh.com/c/c-function/

4) Explain the SWITCH statement with example


Ans: http://www.programiz.com/c-programming/c-switch-case-statement
http://fresh2refresh.com/c/c-case-control-statements/
http://www.cprogramming.com/tutorial/lesson5.html
5) Describe the benefits of Object Oriented Programming?
Ans:
https://www.cs.drexel.edu/~introcs/Fa12/notes/06.1_OOP/Advantages.html?
CurrentSlide=3
http://www.quora.com/What-are-the-benefits-of-object-oriented-programming

Some of the advantages of object-oriented programming include:


1. Improved software-development productivity: Object-oriented programming is
modular, as it provides separation of duties in object-based program development.

It is also extensible, as objects can be extended to include new attributes and


behaviors. Objects can also be reused within an across applications. Because of
these three factors modularity, extensibility, and reusability object-oriented
programming provides improved software-development productivity over traditional
procedure-based programming techniques.
2. Improved software maintainability: For the reasons mentioned above,
objectoriented software is also easier to maintain. Since the design is modular, part
of the system can be updated in case of issues without a need to make large-scale
changes.
3. Faster development: Reuse enables faster development. Object-oriented
programming languages come with rich libraries of objects, and code developed
during projects is also reusable in future projects.
4. Lower cost of development: The reuse of software also lowers the cost of
development. Typically, more effort is put into the object-oriented analysis and
design, which lowers the overall cost of development.
5. Higher-quality software: Faster development of software and lower cost of
development allows more time and resources to be used in the verification of the
software. Although quality is dependent upon the experience of the teams, object
oriented programming tends to result in higher-quality software.
6) Explain the various expressions available in C++ with examples?
Ans: Better not to attempt this question

https://msdn.microsoft.com/en-us/library/625x66bt.aspx
http://en.cppreference.com/w/cpp/language/expressions
http://www.dummies.com/how-to/content/expressions-and-declarations-in-cprogramming.html
7) Distinguish between the following terms:
(a) Array and structure
(b) Data Abstraction and Data Encapsulation.
Ans:
Difference between Arrays and Structure
http://www.programming-techniques.com/2011/08/difference-between-arraysand.html

http://stackoverflow.com/questions/8376004/what-is-the-difference-between-anarray-data-structure-and-an-array-data-type-in

Both arrays and structures are classified as structured data


type as provide a mechanism that enables us to access and
manipulate data in relatively easy manner. but they differ
in number of ways:1)An array is a collection of related data elements of same
type. Structure can have elements of different types.
2. An array is derived data type whereas a structure is a
programmer defined one.
3) An array behaves like a built in data types only we need
to declare it.but in case of structures , first we have to
design and declare a data structure before the variables of
that type are declared and used.
example:of array:
#include<stdio.h>
#include<conio.h>
void main()
{
int a[5];//only declare an array variable
example of structure:
struct book_bank
{
char title[5];
char author[3];
int pages;
float price;
};// this format of defining is also known as TEMPLATE
struct book_bank book1, book2;// declaration of variable
Difference between Abstraction and Data encapsulation
http://pragmaticcraftsman.com/2006/05/encapsulation-vs-abstraction/
http://theprofessionalspoint.blogspot.com/2013/05/difference-betweenencapsulation-and.html
8) Explain the Various forms of inheritance with suitable example
Ans:

http://www.cppforschool.com/tutorial/inheritance.html
http://www.cprogramming.com/tutorial/lesson20.html
9) Explain the basic concepts of Object Oriented programming.
Ans:
https://www3.ntu.edu.sg/home/ehchua/programming/cpp/cp3_OOP.html
http://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm

10) Write short note on the followings:


This link covers all : http://www.studytonight.com/cpp/types-of-inheritance.php
http://www.cppforschool.com/tutorial/inheritance.html
(a) Single Inheritance
https://www.hscripts.com/tutorials/cpp/single-inheritance.php
(b) Multiple Inheritances
https://www.hscripts.com/tutorials/cpp/multiple-inheritance.php
http://www.tutorialspoint.com/cplusplus/cpp_inheritance.htm
(c) Multilevel Inheritance
https://www.hscripts.com/tutorials/cpp/multilevel-inheritance.php
(D) Hybrid Inheritance
https://www.hscripts.com/tutorials/cpp/hybrid-inheritance.php

Das könnte Ihnen auch gefallen