Sunday, September 29, 2013

Introduction to C programming Language

What is language: A language is a communication medium or interface between two different systems. or a language is set of rules which can be mutually understandable.

Natural Languages: The Natural languages like English, Telugu, Hindi are used to communicate between the human beings. Each natural language has set of rules called grammar.

Programming language: As language is communication medium, programming language also a communication medium/interface between machine and human being. E.g: Assembly language, C, C++, JAVA, PHP. There are two types of programming languages namely

  • Low level languages
  • High level languages

Low level languages: As machine understands only binary data like 0 or 1, so machine language is binary language. And human does not understand huge binary code, we need interface to communicate which low level language called assembly language. These are processor dependent languages. Which have limited no. of instructions like ADD, MOV, INC, JMP.
High Level languages: As humans cant remember all the assembly level instructions, so we have high level languages like JAVA, C++, PHP, Python. High level languages have the instruction similar to natural language instructions like if, while, for etc.


Natural Language Vs Programming Language: As both are languages, difference is natural languages are context sensitive and where as programming languages are context free. Context sensitive means depending on the context meaning will change. Where as for context free means, there is only one meaning, there is no context.

E.g: for Context sensitive

  • I like Cricket
  • He is playing cricket like Sachin
Here for Like , there is a separate meaning in both the sentences.


Introduction to C Language: C is a general-purpose programming language initially developed by Dennis Ritchie. C is one of the most widely used programming languages of all time. And C is used to develop applications in different domains like

  • System programs (operating systems, compilers, assemblers)
  • Embedded systems
  • Numerical computations
  • Graphical applications 
  • Security applications
C language supports both low level language and high level language features. C is very efficient and power full language as it directly interacts with hardware using low level features. Because of this features, most of the applications which need efficiency and fast execution are developed in C language. Unix operating system itself developed in C Language. Below are the some of the unique features of C.


There are different types of compilers. well known compilers are given below. For more C compilers click here.

  • GCC
  • Turbo C or Borland C 




Saturday, September 28, 2013

C programming language tutorials


C Programming language Basics:
  • Introduction to C Language
  • C keywords and identifiers
  • C variables and constants
  • C programming data types
  • C input/output
  • C programming operators
  • C Introduction examples
Decision and loops:
  • C programming if..else
  • C programming for loops
  • C do..while loops
  • C break and continue
  • C Switch ..case statement
  • C programming goto
  • Decision and loop examples
C programming language functions:
  • C function introduction
  • C user defined functions
  • C function types
  • C programming recursion
  • C storage class
  • C function example
Arrays and strings:
  • C arrays introduction
  • C multi-dimensional arrays
  • C arrays and functions
  • C programming strings
  • C string functions
  • C array examples
  • C string examples
C programming language pointers:
  • C pointer introduction
  • C pointers and arrays
  • C pointers and functions
  • Memory Management
  • Dynamic memory allocation
  • C pointer examples
Structure and union:
Bitwise Operators:
  • AND, OR, XOR,NOT
  • Common bitwise operations
  • Bit-fields


C programming language Miscellaneous:
  • C enumeration
  • C pre-processors
  • Precedence and associativity
  • C library functions
  • C programming examples



Thursday, September 19, 2013

BB10 How to know the network status

Recently I came across a scenario where we need to retrieve the network status in the BB10 Application. As we are implemented the App using Qt frame work 4.8, this Qt framework does not have any API/method to get the network status. Here I got one API which is provided by Blackberry team for the BB10.0.

netstatus_get_availability is the method to get the network status in the BB10 OS. And Below is the syntax for that method. This method works only in BB10.0. Its depreacated for later versions and introduced new method netstatus_get_info().
Syntax:
BPS_API int netstatus_get_availability(bool *is_available)

In the document they specified, need to add libbps library,  but without including libbps also application working fine.For updated API' and for more information for retrieving network status for the BB10.

http://developer.blackberry.com/native/reference/core/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_ref/topic/netstatus_get_availability.html


Popular Posts