Showing posts with label Technical skill. Show all posts
Showing posts with label Technical skill. Show all posts

Saturday, July 26, 2008

Basic Stuff in Pointer (part-1):

Pointer is not a tough one to learn, but it is rather easy when you understand the basic stuffs involved in the pointer.

There are six things you need to know to learn the basic stuffs in pointer

Understanding the variables and computer memory:

What will happen when we declare a variable?

Compiler determines what kind of variable it is. Based on the type of variable it reserves a memory. It is very simple to understand with an example.

EG: We are going to buy a chocolate. There are varieties of chocolate with different cost. Some of them are costly and cheaper. What we will do based on our finance we buy chocolate. If we are having 10 rupees we buy chocolate for ten rupees. If we have 50 rupees we buy chocolate for 50 rupees.

Similarly if the variable type is a char it reserves one byte, if it is int 2 bytes and goes on based on the type it allocates memory in computer.

The compiler knows 4 things about a variable

  • Its name
  • Its type
  • Its size
  • Its location in memory

E.g.: int a; compiler allocates 4008344 as memory location.

Then’ a’ is variable name
‘a’ is int (Integer) type
‘a’ is 2 byte size
‘a’ is located at 400834 in memory.

Using Size of:

We can determine the size of a variable by Sizeof () operator. Actually sizeof is a function which returns the sizeof a variable.

E.g.: program demonstrating use of sizeof ()
Int a;
printf (“The size of variable 'a' is %d”, sizeof (a));
Result:
The size of variable ‘a’ is 2

Finding memory location with & operator

& is an operator when prefixed with a variable, it returns the location (address) of the variable.
That is why & is prefixed with a variable in name in scanf.

E.g.:
Int a;
Scanf(“%d”,&a);
If we enter 4 as input it scans 4 and saves in the location of a allocated by compiler. To know what the address is we are using & in scanf before variable name.

We can see other three thing s in the next post:

Creating pointer variables
Storing memory locations in pointer
Doing pointer math

Wednesday, May 14, 2008

Posts for Placment- Encapsulation

Hi my fellow readers, I am back to blogging after a successful completion of my course in BE: Computer Science. Now I am going to help my juniors in their placement activities by writing articles regarding their technical interviews.

Daily I am going to post about some topic which will be very interesting to the readers.
Today I am going to write about the Encapsulation.

Technical Definition:
Binding a data and code (functions, modules) into a single identity.

To explain technically we can take class as an example.

Class classname
{
Variable declaration: // Data
…………..
………….

Function declaration: // Code
………….
…………
}

So we have combined the data (variables) and code (functions) into a single Entity classes.

In real time the meaning of Encapsulation is

Binding any two activities into a single activity.

Example:

Vicks Action 500 is drug which cures both cold and Head Ache. Here the Vicks Action 500 drug is made of merging two drugs one curing head ache and another curing cold.

In next post we can see about pointers. I will make this pointer concept very easy to understand in next post.

Tuesday, March 18, 2008

Technical Training for Professionals

Most of the students are trying to take an IT Profession as their career. But they don’t know where to get proper assistance to increase their skills. Tech Training Schools is an organization which provides assistance for the fresher. They are listing the technical school by location where they can go and get training. The tech schools provide a lot of training among them most important training is IT Training. They train them in database, Network, Web Design, Multimedia and software Engineering. So start training through these technical schools and improve your skill set.