Posts Tagged: C#

Function Overloading in C++.

Overloading: There are many simple definition of Overloading like:

1: In overloding function with same name having different parameters.

2: Function overloading may have different return types.

A program to find sum of n numbers by using while loop in c++.

This program add up to n numbers which will be provided by user. Firstly user will enter a fix number to indicate how many numbers he wants to add and then he will enter n numbers.

Number pattern in C.

Number Patterns: In C language you can print any number pattern. Here, this program teach you how print all combination of 123.

Program to find Even or odd number using Array in C++.

In this program user provide data (numbers) to find even or odd numbers by using Array in C++.

Let’s open turboC++ and write the following Code .

Program to Add n numbers in C++.

This C++ program add all ‘n’ numbers entered by the user This program first ask to the user to enter the value of ‘n ‘ and then ask to enter the ‘n’ Number to add them then it Display the result on Screen.

Program of Overloading (-) minus unary operator in C++.

Overloading : Overloading an operator simply means attaching additional meaning and semantics to an operator.In case of unary operator overloaded using a member function no argument is passed to the function whereas in case of friend function a single argument must be passed.

Program to Display Fibonacci series in C++.

Fibonacci Series: – is in the form of 0, 1, 1, 2, 3, 5, 8, 13, 21,…… To find this series we add two previous terms/digits and get next term/number.

What result would print from the following code snippet

Console.WriteLine(“1234”.GetType()); What is output of this code snippet.

KnownType attribute in wcf: Part 6

The wcf service generally accept and returns the base type. If you expect the service to accept and return inherited type then we use knowntype attribute. In other words by default you cannot use subclass of data contract class instead of its base class. We need to tell explicitly to wcf about the subclass using the knowntype attribute.

Access Method of Parent Class with Instance of Child Class

Inheritance is one of the primary concepts of object-oriented programming.