Masters in programming

Masters in programming Become a master of c/c++ language
with one of the best faculty
u will get the minute details as well as the major details of the language

27/11/2018

In the current scenario E-business projects are becoming popular day-by-day. People can sell and purchase at their ease. In this regard e-business has got lot of importance and became necessity. To satisfy customer need it becomes mandatory to adopt industry regulations, standards to complete the e-...

18/10/2014

3. Derived data type in C:
• Array, pointer, structure and union are called derived data type in C language.
• To know more about derived data types, please visit “C – Array“ , “C – Pointer” , “C – Structure” and “C – Union” topics in this tutorial.
4. Void data type in C:
• Void is an empty data type that has no value.
• This can be used in functions and pointers.
• Please visit “C – Function” topic to know how to use void data type in function with simple call by value and call by reference example programs.

18/10/2014

Enumeration data type in C:
• Enumeration data type consists of named integer constants as a list.
• It start with 0 (zero) by default and value is incremented by 1 for the sequential identifiers in the list.
• Enum syntax in C:
enum identifier [optional{ enumerator-list }];
• Enum example in C:
enum month { Jan, Feb, Mar }; or
/* Jan, Feb and Mar variables will be assigned to 0, 1 and 2 respectively by default */
enum month { Jan = 1, Feb, Mar };
/* Feb and Mar variables will be assigned to 2 and 3 respectively by default */
enum month { Jan = 20, Feb, Mar };
/* Jan is assigned to 20. Feb and Mar variables will be assigned to 21 and 22 respectively by default */
• The above enum functionality can also be implemented by “ ” preprocessor directive as given below. Above enum example is same as given below.
Jan 20;
Feb 21;
Mar 22;

11/10/2014
11/10/2014

C – Data Types:
There are four data types in C language. They are,
S.no Types Data Types
1 Basic data types int, char, float, double
2 Enumeration data type enum
3 Derived data type pointer, array, structure, union
4 Void data type void
1. Basic data types in C:

1.1. Integer data type:
• Integer data type allows a variable to store numeric values.
• “int” keyword is used to refer integer data type.
• The storage size of int data type is 2 or 4 or 8 byte.
• It varies depend upon the processor in the CPU that we use. If
we are using 16 bit processor, 2 byte (16 bit) of memory will
be allocated for int data type.
• Like wise, 4 byte (32 bit) of memory for 32 bit processor and 8
byte (64 bit) of memory for 64 bit processor is allocated for int
datatype.
• int (2 byte) can store values from -32,768 to +32,767
• int (4 byte) can store values from -2,147,483,648 to
+2,147,483,647.
• If you want to use the integer value that crosses the above
limit, you can go for “long int” and “long long int” for which the
limits are very high.
Note:
• We can’t store decimal values using int data type.
• If we use int data type to store decimal values, decimal values
will be truncated and we will get only whole number.
• In this case, float data type can be used to store decimal
values in a variable.

1.2. Character data type:
• Character data type allows a variable to store only one
character.
• Storage size of character data type is 1. We can store only one
character using character data type.
• “char” keyword is used to refer character data type.
• For example, ‘A’ can be stored using char datatype. You can’t
store more than one character using char data type.
• Please refer C – Strings topic to know how to store more than
one characters in a variable.

1.3. Floating point data type:
Floating point data type consists of 2 types. They are,
1. float
2. double
1. float:
• Float data type allows a variable to store decimal values.
• Storage size of float data type is 4. This also varies depend
upon the processor in the CPU as “int” data type.
• We can use up-to 6 digits after decimal using float data type.
• For example, 10.456789 can be stored in a variable using
float data type.
2. double:
• Double data type is also same as float data type which allows
up-to 10 digits after decimal.
• The range for double datatype is from 1E–37 to 1E+37.

09/10/2014

Description for each section of a C program

1 Documentation section: We can give comments about the program, creation or modified date, author name etc in this section. The characters or words or anything which are given between “/*” and “*/”, won’t be considered by C compiler for compilation process.These will be ignored by C compiler during compilation.
Example : /* comment line1 comment line2 comment 3 */
2 Link Section: Header files that are required to execute a C program are included in this section
3 Definition Section: In this section, variables are defined and values are set to these variables.
4 Global declaration section: Global variables are defined in this section. When a variable is to be used throughout the program, can be defined in this section.
5 Function prototype declaration section: Function prototype gives many information about a function like return type, parameter names used inside the function.
6 Main function: Every C program is started from main function and this function contains two major sections called declaration section and executable section.
7 User defined function section: User can define their own functions in this section which perform particular task as per the user requirement

08/10/2014

C language standards:
• C89/C90 standard – First standardized specification for C
language was developed by the American National Standards
Institute in 1989. C89 and C90 standards refer to the same
programming language.
• C99 standard – Next revision was published in 1999 that
introduced new features like advanced data types and other
changes.

08/10/2014

C – Language History
The C language is a structure oriented programming language, developed at Bell Laboratories in 1972 by Dennis Ritchie
• C language features were derived from an earlier language
called “B” (Basic Combined Programming Language – BCPL)
• C language was invented for implementing UNIX operating
system
• In 1978, Dennis Ritchie and Brian Kernighan published the first
edition “The C Programming Language” and commonly known
as K&R C
• In 1983, the American National Standards Institute (ANSI)
established a committee to provide a modern, comprehensive
definition of C. The resulting definition, the ANSI standard, or
“ANSI C”, was completed late 1988.

07/09/2014

What would be the output of the following program:
main()
{
int x=40;
{
int x=20;
printf("\n%d",x);
}
printf("%d",x);
}

07/09/2014

What would be the output of following program code ?
main()
{
int i =2;
printf("\n%d %d", ++i,++i);
}

04/09/2014

Welcome to the world of programming guys . Bring more students to like this page for their bright future .....

04/09/2014

What are different syntax used to include header files in C++ ?

Address

Rachna Nagar
Bhopal
462023

Telephone

9893190604

Website

Alerts

Be the first to know and let us send you an email when Masters in programming posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share