Sunday, 30 December 2018

C Character Set


Character set is important for any computer languages because this character is understood by the compiler. To write a program, we code, but the code has to be meaningful to the compiler. To write statement, expression, variable or custom function name, this are formed from this computer set.

C character sets are belows:
  • Uppercase letter A to Z
  • Lowercase letter a to z
  • The digit 0 to 9
  • And some special character sets
    +    -      *    /    =    %   &    # 
    !     ?     ^    "      '   ~      \      |
    <     >   (      )      {    }     [      ]
    :      ;     .     ,       _
Most versions of the language also allow certain other characters, such as @ and $, to be included within strings and comments. It also allow some White space characters. These are;
  • \b blank space
  • \t horizontal tab
  • \v vertical tab
  • \r carriage return
  • \f form feed
  • \n new line 
  • \\ Back slash
  • \’ Single quote
  • \" Double quote
  • \? Question mark
  • \0 Null
  • \a Alarm (Audible Note)

Saturday, 29 December 2018

C Program Structure

C program structure

C is structured. So, it is modular and the modules are function, i.e. the modules are called function. One of the functions must be called main. The program will always begin by executing the main function, which may access other functions.

To run a c program, you must include something at the beginning of the code, which will ensure your smooth compiling. It is sort of mandatory because this loads some initial code to run a program. For example;
#include <stdio.h>

The #include is a "preprocessor" directive that loads a file called stdio.h (stdio.h is a header file). Header files are collection of some build-in codes that does a lot of task to run a program.
Now look at the below program;

#include <stdio.h>
int main()
{
  printf("Hello,World"); 
  return 0; 
  //end of code(this is a comment)
}

So the whole program is enclosed by a function and this function is called 'main()'.
In later tutorial, you will learn about details of functions, how to write function, how to use it, what are required to write a function.  
Codes are written in an enclosed pair of braces, i.e., { }
Inside braces expression statements are written, i.e., printf("Hello,World");
Each expression statement must end with a semicolon (;). 
Comments (remarks) may appear anywhere within a program, as long as they are placed within the delimiters  /* and */ (e.g., /* this is for multiple comment */). Single line comment can be written after two forward slashes //.
The program is typed in lowercase. Either upper- or lowercase can be used, though it is customary to type ordinary instructions in lowercase.

Wednesday, 26 December 2018

History of C Language

History of C

C was developed by Dennis Ritchie at Bell Telephone Laboratories, Inc. (now a part of AT&T) in 1972. When Dennis Ritchie was trying to rewrite the code for UNIX operating system, C was born. He was considering to rewrite the system using the B language, Thompson's( Ken Thompson invented B programming language) simplified version of BCPL. The name of C was chosen simply as the next after B. So, C is an outgrowth of two earlier languages, called BCPL and B.

Earlier days, C was basically used within Bell Laboratories. In 1978, Brian Kernighan and Ritchie published a definitive description of the language. The Kernighan and Ritchie description is commonly referred to as "K&R C." After that, further development of C was began. By the mid 1980s, the popularity of C had become widespread. Numerous C compilers and interpreters had been written for computers of all sizes, and many commercial application programs had been developed. Many commercial software applications were started to re-written in C language.

Due to availability of various C compilers, minor incompatibilities were found between different implementations of the language. To stop this problem, the American National Standards Institute (ANSI) formed a committee, X3J11, to establish a standard specification of C in 1983. In 1990, the ANSI C standard (with formatting changes) was adopted by the International Organization for Standardization (ISO). Later the different versions of C was introduced as C89, C99 etc. and the current standard for the C programming language is C18(published in June, 2018).




Tuesday, 25 December 2018

Introduction to C Language

Introductoin to C language

C is a general-purpose, structured programming language. It is really a powerful language to write complex computer program and that's why it is really one of a popular high level language like Pascal and Fortran. It has features that allows user to write low-level programming language and it is flexible also to write system programming (i.e. operating system) and application programming. 

It's instruction set includes large number of operators, several built-in functions, control-statement keyword etc. Hence, it allows users to write additional library function. Program written in C language is very fast.

C is highly portable. So, a C program, written in one computer can be run on another with little or no modification. The reason for this is that C relegates most computer-dependent features to its library functions. 

As it said earlier that C is structured programming language which means program can be written as block in terms of function module. A proper collection of modules would make a complete program.

Monday, 21 December 2015

IMEI Number


IMEI stands for 'International Mobile Equipment Identity', is a unique (15 or 17 digit) number assigned to  mobile phone. It can also be found in 3G/4G tablets, laptops with PCMCIA wireless internet cards, and other mobile equipment. In a dual-SIM phone, you’ll see two IMEI numbers, one for each SIM slot. The IEMI is also known as 'International Mobile Station Equipment Identity'. In the case of CDMA network there is also a MEID number.

The main purpose of using this number is to trace the device. As the number is unique, it helps us to identify the device and therefore it can be used for stopping a phone from accessing that network if it is theft. We can use this number to block a mobile phone from being used by another person.

How to find this number: 
  • Dial *#06# on your keypad and press call or send button, your IMEI number will be retrieved and displayed on your screen.
  • On the back or bottom of the device or under, IMEI number can be found printed.
  • IMEI numbers can also be printed on the original packaging of your device.

The Structure of an IMEI Number:
IMEI numbers either come in a 17 digit or 15 digit sequences of numbers. The IMEI format currently utilized is AA-BBBB-CC-XXXXXX-Z:


First 8 digits of IMEI number are TAC (Type Allocation Code) which will give you the mobile phone brand and model. Other 7 digits are defined by manufacturer (6 are serial number and 1 is check digit).
For example a IMEI number: 354230061155201 
Here TAC: 354230 | FAC: 06 | SNR: 115520 | CD: 1

Monday, 23 November 2015

CSS


According to W3C , CSS is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents. The elaboration of CSS is Cascading Style Sheets. It describes how the markup language will be demonstrated in the screen.
CSS separates the document content from document presentation. This separation improves to write markup language in a clean way. Moreover, it enables to use same design style in various part of the document which reduces the redundancy of writing more  style languages.

HÃ¥kon Wium Lie first proposed about CSS in 1994 when he was working with Tim Berners-Lee at CERN. Gijsbert (Bert) Bos also proposed similar type of idea at that time. W3C released first  CSS Recommendation (CSS1) in 1996 after much discussion on various mailing list.

CSS have simple syntax. A CSS rule-set consists of a Selector and a Declaration Block. Selector points to the markup language (i.e HTML element) element and  Declaration block contains a list of declaration in braces. Each declaration consists of property and value and separated by colon. Each declaration ends up with semicolon. Markup language elements are may be specified with attributes like Id or Class. 

Example:
Suppose H1 is a HTML tag and the document can be written as:
<h1> Sen Computing </h1> 
It can be associated with CSS ----
<h1 style="color: red; font-size: 15px;"> Sen Computing </h1> [Inline stylesheet]
or
h1{color: red; font-size:15px}   [External stylesheet]

External stylesheet can be written in file that have .css extension and can be linked up with the HTML file.
The current version of CSS is CSS3.

What Is The Difference Beween Numerals and Number?

Number is a concept, it is a mathematical concept. To express the quantitative value of the object, this  is developed in ancient history. S...