Tuesday, January 5, 2016

Character Sets Supported by C Programs

C uses alphabets (upper case 'A' to 'Z' or lower case 'a' to 'z'), digits ('0' to '9') and some certain special characters shown in the figure below to construct basic elements of C program (constants, variables, expressions, operators etc.)
C Character Set
C Character Set

Identifiers and Keywords

Identifiers are the names by which we can distinguish different program elements (such as variables, constants, functions). The identifiers consist of letters (uppercase or lowercase) and digits in any possible combination as long as it follows one rule of identifiers.


The rule states that every identifier must have a letter as its first character; no digits are allowed in the first character. So, while “first” is a valid identifier, “1st” is not. Also, no identifier must contain any special character except “_” (underscore). Given below, a list of examples of valid and invalid identifiers with a reason why they are invalid.

1'stInvalid (First character must be letter )
firstValid
total_areaValid
phone-noInvalid ( ‘-‘ not allowed )
national flagInvalid ( blank space not allowed )
f1carValid

There is another restriction for identifiers. Some reserved words can't be used as identifiers. These reserved words are predefined by C language and have predefined meanings and can be used for their intended purposes. They are called keywords. The list of keywords is given below

Monday, January 4, 2016

C Programming Tutorial

To learn any new programming language, for example C, C++, Java, etc., most commonly used approach is to write a basic HelloWorld program first and then learn the concepts from that. Let's follow the same approach here and first write a C program and learn about basic syntax of C programming.

HelloWorld in C:

  1. #include<stdio.h>
  2. int main()
  3. {
  4. printf("Hello world!");
  5. return 0;
  6. }

How to Run the HelloWorld C Program:

To compile and run the above C program,
  • Or you can make use of online services like IdeOne. For learning purposes, this is the better option.

Sunday, January 3, 2016

Pig Use Case in Telecom Industry

Telecom Industry generates huge amount of data (Call details). To process this data, we use pig to De-identify the user call data information.

First step is to store the data into HDFS, applying pig scripts on the loaded data and refining user call data and fetching important call information like Time rate, repetition rate, and some important log info. Once the de-identified Information comes out, the result will get stored into HDFS.
Like this huge amount of data comes into the system servers and it will be stored in HDFS and processed using scripts. During this process it will filter the data, iterates the data and produces results.
IT companies which use Pig to process their data are Yahoo, Twitter, LinkedIn and eBay. They use Pig to run most of their MR jobs. The pig is mainly used for web log processing, typical data mining situations and for image processing.