Saturday, July 6, 2013

Statements in C

In C, everything we write comes under a statement. A C program contains many number of statements. These are the building blocks of your C program.

Every Statement is ended up with a semicolon(;) except for the directives i.e., declared with the pre-processor (#).

For example,
x=2+3;
is a normal statement which adds up the values 2 and 3 and place the resulting value into the variable x.

Scanf in C

scanf() is a function in C which enables user to give some input to C program. This scanf() function is provided in the library of the C programming, in the header file "STDIO.H". This header is responsible for the Input and Output operations on C.

All the functions responsible for the Input and Output operations are present in this header file. We can see the prototypes of these functions by visiting the Include folder of the "TC" which you have installed on your computer.

If you observe a C program carefully, we do have a doubt regarding the scanf() function. C doesn't support function overloading, but scanf() takes any number of parameters we give. Did you ever have a doubt of that???

Friday, July 5, 2013

Printf with More Format Specifiers

We know that printf() function is responsible for printing something to the Output in C. Generally we write a printf() function with a string in it to be printed, or a string with format specifiers, followed by the variables which should take place of the format specifiers.

For example,


  1. #include<stdio.h>
  2. main()
  3. {
  4. int a=5;
  5. printf("Hello\n");
  6. printf("Your number is %d", a);
  7. }
For the above program, the output turns out to be as

Hello
Your number is 5

But if it has more or less number of format specifiers, then what happens???

Thursday, July 4, 2013

Printf in C

Printf() is a function in C which enables user to print some text on to the screen. This printf() function is provided in the library of the C programming, in the header file "STDIO.H". This header is responsible for the Input and Output operations on C.

All the functions responsible for the Input and Output operations are present in this header file. We can see the prototypes of these functions by visiting the Include folder of the "TC" which you have installed on your computer.

If you observe a C program carefully, we do have a doubt regarding the printf() function. C doesn't support function overloading, but printf() takes any number of parameters we give. Did you ever have a doubt of that???

Constants in C

A Constant is a data storage location used by our program like a variable. But we can't change the value of a constant during execution. There are two types of constants in C. They are

  1. Literal Constants.
  2. Symbolic Constants.

Monday, July 1, 2013

Selector in JQuery

JQuery Selectors are one of the most important part of a Jquery statement. They allow us to select particular element from the web page and perform some kind of action on them. This selection may be based on CSS selectors or based on their own custom selectors.

All the selectors are represented by $ followed by parenthesis, $().


Typedef Keyword in C

The typedef keyword is used to create a new name for the existing data type. In other words, we can say that typedef creates a synonym for the existing data type. For example,

typedef int integer;
creates integer as a synonym for integer. Hence we can use integer as a data type for the int.

Example:

integer count;