Monday, 17 September 2012
Thursday, 13 September 2012
Switch Case control structure
SWITCH stmt is used for handling n number of decisions at a
time.
Hence it is also known as multi way decision making stmt.
SWITCH
STATEMENT can't be applied to float and
double.
Break stmt transfers the control out of
the switch stmt.
Syntax
switch(choice)
switch(choice)
{
case
1:block of stmt:-1;
break;
case
2:block of stmt:-2;
break;
…………………….
……………………..
………………………
case
n: block of stmt:-n;
break;
default:
invalid stmt;
break;
}
sample program
Labels:
C Tutorial
Logical operators workshop
Logical && and logical ||
logical && : If all are true then only true otherwise false.
logical || : if any one is true then it is true otherwise false.
Program on logical operators
A company insures its
drivers in the following cases:
− If the driver is
married.
− If the driver is
unmarried, male & above 30 years of age.
− If the driver is
unmarried, female & above 25 years of age.
In all other cases
the driver is not insured. If the marital status, sex and age of the driver are
Labels:
C Tutorial
If else control structure
C uses the keyword
if-else to implement the decision control instruction.
Syntax
if(test condition-1)
{
if(test condition-2)
{
block of stmt-1;
}
else
{
block of stmt-2;
}
}
else
{
block
of stmt-3;
}
Stmt-x;
Note: braces are mandatory when, corresponding to if or else
statement, multiple steps are to be executed.
Sample program
Labels:
C Tutorial
If Control Structure
if
C uses the keyword if to implement the decision
control instruction.
if statement can’t terminate
with semicolon, but by mistake if we terminate ,compiler won’t give any error.
Syntax
if (test condition)
{
------------------------------------
------------------------------------
------------------------------------- block of statements
--------------------------------------
}
Stmt-x;
Sample if program
Labels:
C Tutorial
Head First Programming
Looking for a reliable way to learn how to program on your own, without being overwhelmed by confusing concepts? Head First Programming introduces the core concepts of writing computer programs - variables,
decisions, loops, functions, and objects - which apply regardless of the
programming language. This book offers concrete examples and exercises
in the dynamic and versatile Python language to demonstrate and
reinforce these concepts.
Learn the basic tools to start writing the programs that interest you, and get a better understanding of what software can (and cannot) do. When you're finished, you'll have the necessary foundation to learn any programming language or tackle any software project you choose.
Learn the basic tools to start writing the programs that interest you, and get a better understanding of what software can (and cannot) do. When you're finished, you'll have the necessary foundation to learn any programming language or tackle any software project you choose.
Head First JavaScript
Want to make the leap from writing HTML and CSS
web pages and create dynamic web applications? Want to take your web
skills to the next level? It sounds like you're ready to learn the Web's
hottest programming
language: JavaScript. Head First JavaScript is your ticket to going
beyond copying and pasting the code from someone else's web site, and
writing your own interactive web pages.
Head First HTML5 Programming
HTML has been on a wild ride. Sure, HTML
started as a mere markup language, but more recently HTML's put on some
major muscle. Now we've got a language tuned for building web
applications with Web storage, 2D drawing, offline support, sockets and
threads, and more. And to speak this language you've got to go beyond
HTML5 markup and into the world of the DOM, events, and JAVASCRIPTS APIs.
CLICK HERE TO DOWNLOAD
CLICK HERE TO DOWNLOAD
Head First HTML with CSS & XHTML
Tired of reading HTML books that only make sense after you're an expert? Then it's about time you picked up Head First HTML with CSS
& XHTML and really learn HTML. You want to learn HTML so you can
finally create those web pages you've always wanted, so you can
communicate more effectively with friends, family, fans, and fanatic
customers. You also want to do it right so you can actually maintain and
expand your web pages over time, and so your web pages work in all the
browsers and mobile devices out there. So what are you waiting for? Leave those other dusty
books behind and come join us in Webville. Your tour is about to begin.
Click Here To Download
Head First C#
You want to learn C# programming, but you're not sure you want to suffer
through another tedious technical book. You're in luck: Head First C#
introduces this language in a fun, visual way. You'll quickly learn
everything from creating your first program to learning sophisticated
coding skills with C# 4.0, Visual Studio 2010 and .NET 4, while avoiding
common errors that frustrate many students.
Click Here To Download
Click Here To Download
Head First Java
Click Here To Download
Head First Java delivers a highly interactive, multisensory learning experience that lets new programmers pick up the fundamentals of the Java language quickly. Through mind-stretching exercises, memorable analogies, humorous pictures, and casual language, Head First Java encourages readers to think like a Java programmer. This revised second edition focuses on Java 5.0, the latest version of the Java development platform.
Head First Java delivers a highly interactive, multisensory learning experience that lets new programmers pick up the fundamentals of the Java language quickly. Through mind-stretching exercises, memorable analogies, humorous pictures, and casual language, Head First Java encourages readers to think like a Java programmer. This revised second edition focuses on Java 5.0, the latest version of the Java development platform.
Head First C
Head First C provides a complete learning experience for C and
structured imperative programming. With a unique method that goes beyond
syntax and how-to manuals, this guide not only teaches you the
language, it helps you understand how to be a great programmer. You'll
learn key areas such as language basics, pointers and pointer
arithmetic, and dynamic memory management.
Click Here To Download
Click Here To Download
Wednesday, 12 September 2012
Tuesday, 11 September 2012
List of escape sequence in C:
An escape sequence is a character used in C which is not printed in Screen while printing it.It is a character combination consisting of a backslash (\) which is followed by a letter or a combination of digits.
Escape sequence is a single character and thus can be stored in a character constant.
List of escape sequence in C:
The following list contains a list of escape sequence in ANSI C and their use:
\a is used to give an audible alert or beep sound.
\0 is used to print a null character.
\b is used to delete one character to the left of cursor , equivalent to backspace.
\f is used for form feed , or to feed a blank page when printing documents.
\t is used for horizontal tab , or to move the cursor to nest tab stop position.
\n is used for line feed , or to feed a blank line while printing documents.
\v is used for vertical tab , or to assign more space from the previous line.
\r is used for carriage return , or to move the cursor to the nest line during typing.
\\ is used to print a backslash.
\’ Is used to print a single quote.
\” is used to print a double quote.
Escape sequence is a single character and thus can be stored in a character constant.
List of escape sequence in C:
The following list contains a list of escape sequence in ANSI C and their use:
\a is used to give an audible alert or beep sound.
\0 is used to print a null character.
\b is used to delete one character to the left of cursor , equivalent to backspace.
\f is used for form feed , or to feed a blank page when printing documents.
\t is used for horizontal tab , or to move the cursor to nest tab stop position.
\n is used for line feed , or to feed a blank line while printing documents.
\v is used for vertical tab , or to assign more space from the previous line.
\r is used for carriage return , or to move the cursor to the nest line during typing.
\\ is used to print a backslash.
\’ Is used to print a single quote.
\” is used to print a double quote.
Labels:
C Tutorial
Thursday, 6 September 2012
Understanding C program execution
Animation of program execution
The C programming language is a popular and widely used programming language for creating computer programs. Programmers around the world embrace C because it gives maximum control and efficiency to the programmer.
If you are a programmer, or if you are interested in becoming a programmer, there are a couple of benefits you gain from learning C:
- You will be able to read and write code for a large number of platforms -- everything from microcontrollers to the most advanced scientific systems can be written in C, and many modern operating systems are written in C.
Labels:
C Tutorial
Operators in C
There are three types of operators. A unary expression consists of either a unary operator prepended to an operand, or the sizeof keyword followed by an expression. The expression can be either the name of a variable or a cast expression. If the expression is a cast expression, it must be enclosed in parentheses. A binary expression consists of two operands joined by a binary operator. A ternary expression consists of three operands joined by the conditional-expression operator.
C includes the following unary operators:
Labels:
C Tutorial
Rules that are applicable to all C programs
(a) Each instruction in a C program is written
as a separate statement. Therefore a complete C program
would comprise of a
series of statements.
(b)
The statements in a program must appear in the same order in which we
wish them to be
executed; unless of course the logic of the problem demands a
deliberate ‘jump’ or transfer of
control to a statement, which is out of
sequence.
(c) Blank spaces may be inserted between two words to improve the readability of
the statement.
However, no blank spaces are allowed within a variable, constant
or keyword
(d) All statements are entered in small case
letters.
(e) C has no specific rules for the position at
which a statement is to be written. That’s why it is
often called a free-form
language.
(f) Every C statement must end with a ;. Thus ; acts as a statement
terminator.
Labels:
C Tutorial
Keywords,Variables and Constants in C
"Keywords" are words that have special meaning to the C compiler.Keywords are also called Reserved words.
Following are the keywords of C language
32 keyword's in C language
Variables
A Variable is a meaningful name of data storage location in computer memory. When using a variable you refer to memory address of computer.
Labels:
C Tutorial
What is C
Why ?
To develop device drivers at lower level,
Most popular in Virtual reality Systems, Embedded Systems,
Widely used in UNIX operating system development.
Who ?
It was designed and written by a man named Dennis Ritchie
Where and When?
Labels:
C Tutorial
Wednesday, 5 September 2012
Programming: Important Tips to Learn It Faster
As the popular idiomatic saying goes, “Rome
wasn’t built in a day.” This particular saying applies to programming, which is
neither something that cannot be done within a short period of time nor
something that may take a long time to accomplish. Programming can be
difficult, especially with all the codes, operators, and the dreaded language
that one must consider and be reminded of. However, there are a lot of
important tips that come with programming, especially for the so-called
“neophytes” of the field. For them,
taking programming one step at a time would be very essential. They may take
the programming course seriously, but they should not guarantee themselves that
they know everything about it. Many others learn too fast that they get lost in
the moment. Sticking to the basics would make a difference.
Labels:
How To
Tuesday, 4 September 2012
Subscribe to:
Posts (Atom)