Friday, September 23

placement

If you are preparing for a campus recruitment for an IT company it is important to be clear with the basics of these languages well. There would be questions around this, especially if you have mentioned them in your Resume. The information below would be useful for you. While it is a bit in detail, at least knowing clearly a portion of this will be handy. Please do not try to over learn and create an impression to the interviewer that you are trying to be extra smart.  I have compiled this for you and hope it will be useful. Be clear with the basics of Object Orientation like Encapsulation, Polymorphism etc.

Java and C

The main difference between Java and C are speed, portability, and object-orientation. Java was created for the purpose of making a language that could be implemented on many different types of computers (cell phone, mac, PC, Linux, etc)

C on the other hand can only be run on a computer of the same type as the one that compiled the program. One of the costs of this portability in Java is speed. On numerous benchmarks Java still lags behind C in terms of speed, but that gap is narrowing.

Java is also object-oriented, whereas C is not. Java allows a user to create classes that contain data and methods. C is not capable of doing that.

Paradigm

C is geared towards procedural programming. That is, you write a number of procedures to do certain tasks and build up a program by calling those procedures as needed.

Java, on the other hand, is geared towards OOP (object oriented programming). With OOP, you define classes which represent an entity (for example, a window, a button, a string of text, a file). From one class many objects may be created, with every object of a certain class having the fields (places to store data) and methods (named blocks of code associated with the object) as defined by the class.

It is possible to write in an object oriented style in C and in a procedural style in Java, but in each case the language will somewhat get in your way. C++ is designed to support both paradigms.

Preprocessor

All C and C++ compilers implement a stage of compilation known as the preprocessor. The preprocessor basically performs an intelligent search and replace on identifiers that have been declared using the #define or #typedef directives. #define can also be used to declare macros. For example, a macro MAX(x,y) could be defined to return whichever of x or y holds the greatest value. This is not like calling a function as the substitution is done before the code is compiled. Most of the preprocessor definitions in C and C++ are stored in header files, which complement the actual source code files.

Java does not have a preprocessor. Constant data members are used in place of the #define directive and class definitions are used in lieu of the #typedef directive, however there is no substitute for macros, which can be useful. The Java approach to defining constants and naming types of data structures is probably conceptually simpler for the programmer. Additionally, Java programs don't use header files; the Java compiler builds class definitions directly from the source code files, which contain both class definitions and method implementations.

Memory Management

In C and C++, any memory that is allocated on the heap (e.g. using malloc or new) must be explicitly freed by the programmer (e.g. using free or delete). Forgetting to free memory leads to memory leaks, and in long-running programs can lead to the memory usage of the program growing very large.
Java provides garbage collection, meaning that memory is freed automatically when it is no longer reachable by any references. This prevents memory leaks, but can lead to pauses in execution while the garbage collector runs. Also, there is no promise of timely destruction in Java.

Pointers

Most developers agree that the misuse of pointers causes the majority of bugs in C and C++ programs. Put simply, when you have pointers, you have the ability to attempt to access memory that isn't yours and modify memory relating to a different data structure than the one you intended by accident. C/C++ programmers regularly use complex pointer arithmetic to create and maintain dynamic data structures. It's powerful, but can lead to a lot of time spent hunting down complex and often subtle bugs that arise as a result of having unguarded memory access.
The Java language does not support pointers. Instead, it provides similar functionality by making heavy use of references. A reference can be thought of as a "safe pointer" - the programmer can not directly manipulate the memory address. Java passes all arrays and objects by reference. This approach prevents common errors due to pointer mismanagement. It also makes programming easier in a lot of ways simply because the correct usage of pointers is easily misunderstood by inexperienced programmers.
C++ does provide references too. It considers them as aliases to another variable or object. They are safer than pointers where they can be used.

Bounds Checking

An array in C or C++ is not bounds checked, so attempts to access the sixth element of a 5-element array will appear to work - that is, no runtime error will occur. This means the programmer needs to code very carefully, especially considering the potential for buffer overflow attacks.
Java will bounds check arrays to prevent this from happening, of course with a little extra runtime cost.

Portability And Performance

C and C++ both compile to native machine code. This means that, with a good compiler, programs written in these languages will perform very well. However, it also restricts them to running on the platform they were compiled to run on.
Java generally compiles to Java bytecode, which then runs on top of a virtual machine (the JVM). The JVM has to turn instructions in the bytecode into instructions that are understood by the machine that the bytecode is running on. This gives a runtime performance penalty (although this is getting less significant as the JVM improves and computers get faster). However, now only the virtual machine (and standard library) have to be ported to different platforms, then the bytecode for many Java programs can be executed on that platform. So bytecode is portable accross different operating systems and processors.

Complex Data Types

There are two types of complex data types in C: structures and unions. C++ adds classes to this list. Java only implements one of these data types: classes.
A structure can be emulated by a class - simply write a class without any methods and make all the fields public. However, emulating a union is not always possible in Java, and the memory saving advantages unions hold in C may not carry accross. Java presents a simpler model but at the cost of not being able to save a little memory. For many applications this will be a non-issue.

Strings

C has no built-in string data type. The standard technique adopted among C programmers is that of using null-terminated arrays of characters to represent strings. This practice if often seen in C++ programs too.
Neither C++ or Java have string as a primitive type, but they do both have string objects that are a standard part of the language. In Java this type is called String, and in C++ it is called CString.

Multiple Inheritance

Multiple inheritance is a feature of some object oriented languages that allows you to derive a class from multiple parent classes. Although multiple inheritance is indeed powerful (and sometimes the logical way to define a class hierachy), it is complicated to use correctly and can create situations where it's uncertain which method will be executed. For example, if each of the parent classes provide a method X and the derived class does not, it is unclear which X should be invoked. It is also complicated to implement from the compiler perspective.

C++ supports multiple inheritance. Java provides no direct support for multiple inheritance, but you can implement functionality similar to multiple inheritance by using interfaces in Java. Java interfaces provide method descriptions but contain no implementations. Therefore implementations can only be inherited from one class, so there is no ambiguity over which method to invoke.

Operator Overloading

Operator overloading enables a class to define special behaviour for built-in operators when they are applied to objects of that class. For example, if the * (multiply) operator was to be used on two objects of type Matrix, then matrix multiplication could be implemented. This allows object types to feel much more tightly integrated into the language and can deliver much clearer code. However, sometimes it is not clear what a particular operator would sensibly do for a particular type, whereas a well-named method call would be clear.
Operator overloading is considered a prominent feature in C++. It is not supported in Java, probably in an effort to keep the language as simple as possible and help ensure it is obvious what code does, even though it may take longer to type and read.

Automatic Coercions

Automatic coercion refers to the implicit casting of data types that sometimes occurs in C and C++. For example, in C++ you can assign a float value to an int variable, which can result in a loss of information, although a compiler warning will be given about this. Java does not support C++ style automatic coercions. In Java, if coercion will result in a loss of data, you must always explicitly cast the data element to the new type.

Goto Statement

The goto statement is rarely used these days in C and C++, but it is a standard part of the language. The goto statement has historically been cited as the cause for messy, difficult to understand, and sometimes near impossible to predict code known as "spaghetti code." The primary bad usage of the goto statement has merely been as a convenience to substitute not thinking through an alternative, more structured branching technique. Very occasionally, it can lead to clearer code.
To avoid the potential for "spaghetti code", Java does not provide a goto statement. The Java language specifies goto as a keyword, but its usage is not supported. This is consistent with Java's desire to make programmers write clear, non-messy code.

Variadic Arguments

C and C++ let you declare functions, such as printf, that take a variable number of arguments. Although this is a convenient feature, it is impossible for the compiler to thoroughly type check the arguments, which means problems can arise at runtime without you knowing. Java doesn't support variable arguments at all, though if it did it would likely be able to handle subsequent runtime problems better than C or C++.

Command-line Arguments

The command-line arguments passed from the system into a Java program differ in a couple of ways from the command-line arguments passed into a C++ program. First, the number of parameters passed differs between the two languages.
In C and C++, the system passes two arguments to a program: argc and argv. argc specifies the number of arguments stored in argv. argv is a pointer to an array of characters containing the actual arguments. In Java, the system passes a single value to a program: args. ‘args’ is an array of Strings that contains the command-line arguments.

Prepare your project very well and basic C programs like factorial of number, prime number, Fibonacci series, reversing of no and string, sorting techniques, etc and you will be through in the technical round.

Wednesday, September 21

Check a Number in parent process and pass result to Child Process

#include<stdio.h>
#include<unistd.h>



main()
{
int fd[2],f,i,num,flag=1;
pipe(fd);
f=fork();

if(f>0)
{
printf("PARENT PROCESS..");
printf("\nEnter a number : ");
scanf("%d",&num);



if(num==1)flag=0;for(i=2;i<=(num/2);i++)
if(num%i==0)
{
flag=0;
break;
}

close(fd[0]);
write(fd[1],&flag,sizeof(flag));



}
else if (f==0)
{

printf("\n\nCHILD PROCESS.");close(fd[1]);
read(fd[0],&flag,sizeof(flag
));

if(flag==1)printf(" \n\tIt is a prime number..\n");
else printf("\n\t It is not a prime number..\n");
}



}

Monday, September 19

Code to Access GPS in Android Phones

GET !!! SET !! GO..!!!!!!!!

Location Based Services (LBS) have become very popular in past few years after the advent of GPS enabled smartphone devices . In this post, we shall see how a LBS application for Android works.

Simply speaking map navigation is possible in  following ways:
  1. Using the GPS device in built in mobile-    Easier and precise.
  2. Using the ID of the Cell that the user is currently served by



How to code?
We can give dummy values as GPS co-ordiantes for a location(i.e., Longitude and Latitude) .Another way to emulate location is to including .gpx files. Although it is not very flexible , it can give better performance.

Pre-requisite

First include this code fragment in AndroidManifest.xml to access GPS:

 
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES"/>
<uses-permission android:name="android.permission.INTERNET"/>




Application Code


 
import com.GPS_project.android.lbs.R;
import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class gps extends Activity {

private static final long MINIMUM_DISTANCE_CHANGE_FOR_UPDATES = 1; // in Meters
private static final long MINIMUM_TIME_BETWEEN_UPDATES = 1000; // in Milliseconds

protected LocationManager locationManager;

protected Button retrieveLocationButton;

@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);

retrieveLocationButton = (Button)findViewById(R.id.retrieve_location_button);

locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);

 locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
MINIMUM_TIME_BETWEEN_UPDATES,
MINIMUM_DISTANCE_CHANGE_FOR_UPDATES,
new MyLocationListener()
);

retrieveLocationButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showCurrentLocation();
}
});

}

protected void showCurrentLocation() {

Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);

if (location != null) {
String message = String.format(
"Current Location \n Longitude: %1$s \n Latitude: %2$s",
location.getLongitude(), location.getLatitude());

Toast.makeText(gps.this, message,
Toast.LENGTH_LONG).show();
}
if (location == null)
{
Toast.makeText(gps.this, "No Location Available ", Toast.LENGTH_LONG).show();
}

}

private class MyLocationListener implements LocationListener {

public void onLocationChanged(Location location) {
String message = String.format(
"New Location \n Longitude: %1$s \n Latitude: %2$s",
location.getLongitude(), location.getLatitude()
);
Toast.makeText(gps.this, message, Toast.LENGTH_LONG).show();
}

public void onStatusChanged(String s, int i, Bundle b) {
Toast.makeText(gps.this, "Provider status changed",
Toast.LENGTH_LONG).show();
}

public void onProviderDisabled(String s) {
Toast.makeText(gps.this,
"Provider disabled by the user. GPS turned off",
Toast.LENGTH_LONG).show();
}

public void onProviderEnabled(String s) {
Toast.makeText(gps.this,
"Provider enabled by the user. GPS turned on",
Toast.LENGTH_LONG).show();
}

}

}



Saturday, September 17

Print a string without using any semicolon

Write a program to print a  string without using any semicolon on the program:


#include<stdio.h>
main()
{
      if(printf("Hello.."))
      {
      }

}




I want to know how this program can modified to print any string accepted through Keyboard..!!

If anyone know, feel free to comment it here..!!  :):):)

Letter Pattern

Write a program to print the following
         A
       B B
      CC CC
   DDD DDD





#include<stdio.h>
main()
{
      int i,j,n;
      printf("Enter Limit..  :  ");
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
      for(j=0;j<(n-i);j++)
      printf(" ");
      if(i==0)putchar(65);
      for(j=0;j<i;j++)putchar(65+i);      printf(" ");
        for(j=0;j<i;j++)putchar(65+i);
        printf("\n");
        }
        getch();
        }
     

C program to print a Number pattern

Write a program to print the following pattern:
0

1 1
2 3 5
8 13 21 34



Hi buddy, Jst analyse the no.s in order, 0,1,1,2,3,5,8,13,21,34....
Yess!!!! this is a Fibonacci series.

0+1=1
1+1=2
1+2=3
2+3=5... and so on

Next requirement is to generate pattern. First line has 1 element, second line has 2 elements and so on. And total number of elements in whole pattern will be N*(N+1)/2 , if there are N number of lines.





#include<stdio.h>
main()
{
      int n,i,j,k=0;
      int a[20];
      printf("Enter the lmit..:   ");
      scanf("%d",&n);
      a[0]=0;
      a[1]=1;
      for(i=2;(i<n*(n+1)/2);i++)
      a[i]=a[i-1]+a[i-2];
      for(j=0;j<=n;j++)
     {
      for(i=0;i<j;i++)
      printf("%d\t",a[k+i]);
      k+=i;
      printf("\n");
      }
      getch();
}

C program to Print a number table

Write a program to display the following format:
Nosum
11
23
36
410
515

Logic:

First column contains natural numbers serially..
second column contains  ( Current first column element+ previous second column element)
2+1=3
3+3=6
4+6=10
5+10=15




#include<stdio.h>
main()
{
      int j=0,z,i,n;
      printf("Enter the Limit...  :  ");
      scanf("%d",&n);
      printf("\n----------------\n
printf("no\tsum");
printf("\n------------------\n");
     
      for(i=1;i<=n;i++)
      {
      printf("\n%d",i);
      j+=i;
      printf("\t%d",j);
      }
      getch();
      }
     
     
     





Reverse words in a string using Recursion

Write a program to perform the following to any input string:
     
       Input : Structure is a derived datatype
      output: erutcurtS si a devired epytatad

My Code:

#include<stdio.h>
#include<string.h>
int main()
{
    char line[20],word[10];
    int i,j=0,len;
    printf("Entera string :  ");
    gets(line);
    len=strlen(line);
    for(i=0;i<len;i++)
    {
    while(line[i]!=' '&&i<len)
    word[j++]=line[i++];
    for(j--;j>=0;j--)
    printf("%c",word[j]);
    printf(" ");

    j=0;
    }
    getch();
    return 1;
}


I hope this code was useful for u!!
Have a better program for ths prblm??
Feel free to comment it here..!!  :):):)

C program to find Size of a structure without using sizeof() operator

Write a program to find the size of following structure without using size of operator

struct ABC
 {
 int a;
 float b;
 char c;
 };



Hai Viewer, confused?? Hmm.. calculating the size of a datatype without using sizeof() operator seems to be weird. But pointers will help you to solve this problem.  First u have to initialize a null pointer on intended datatype .You know that in 'structure ' separate memory will be allocated to each element. So, on incrementing that pointer variable, the value of that pointer will be incremented by size of that structure . That is our Goal..!!!! :)
Since we have initialized pointer with 0 we simply need to print the current pointer value..!!



solution

#include<stdio.h>
struct  ABC
{
    int a;

    float b;
    char c;
};
int main()
{

    struct ABC *ptr=(struct ABC *)0;
    ptr++;
printf("%d",ptr);
getch();
return 1;
}



I hope this code was useful for u!!
Have a better program for ths prblm??
Feel free to comment it here..!!  :):):)





C program to Print a Non-Fibonacci series

Write a C program to generate non-fibonacci series to given Limit:

#include<stdio.h>
#include<conio.h>

main()
{
 int n,a,b,c,d,x;

 a=0;
 b=1;
 c=0;
 printf("Enter the upper range of the series:");
 scanf("%d",&n);

 while(c<=n)
 {
  c=a+b;
  a=b;
  b=c;
  d=a+b;

  for(x=c+1;x<d;x++)
  {
   if(x<=n)
    printf("%d",x);
   else
    break;
  }
 }
 getch();
}


I hope this code was useful for u!!
Have a better program for ths prblm??
Feel free to comment it here..!!  :):):)

C program to Reverse a string using recursion

Write a program to reverse any string using recursion (Maximum 15 steps)

Eg: Input   :  Bjarne Stroustrup developed C++
     Output  : ++C depoleved purtsuortS enrajB


This is one of the common question asked in technical contests and interviews.!! it checks ur knowledge about recursion and string. We recursively calls itself until encountering endl character. This fragment plays the vital role: 

{
if (current character != endl) process( next caharacter);
print(current character); 
}


My code:

#include<stdio.h>
char line[20];
void print(int i)
{
     if(line[i]!='\0')
     print(i+1);

     printf("%c",line[i]);
}
main()
{
      printf("Enter a  string..:   ");
      gets(line);
      print(0);
      getch();
}
 




I hope this code was useful for u!!
Have a better program for ths prblm??
Feel free to comment it here..!!  :):):)

Coding Contest- Matrix multiplication

PROBLEM : Write a program to multiply two 3 x 3 matrices where resulting matrix should produce
  • If cell element is even '0'
  • If cell element is odd '1'
eg: If resulting matrix of multiplication is

My code:


#include<stdio.h>
main()
{
      int a[3][3],b[3][3],c[3][3],d[3][3];
      int i,j,k;
      printf("Enter First matrix:...\n");
      for(i=0;i<3;i++)
      for(j=0;j<3;j++)
      scanf("%d",&a[i][j]);
       printf("Enter Second matrix:...\n");
      for(i=0;i<3;i++)
      for(j=0;j<3;j++)
      scanf("%d",&b[i][j]);
     
      for(i=0;i<3;i++)
      for(j=0;j<3;j++)
      {
      c[i][j]=0;
      for(k=0;k<3;k++)
      c[i][j]+=a[i][k]*b[k][j];
      }
      for(i=0;i<3;i++)
      for(j=0;j<3;j++)
      {
      if(c[i][j]%2)d[i][j]=1;
      else d[i][j]=0;
      }
      printf("\n Product is..\n");
      for(i=0;i<3;i++)
      {
      for(j=0;j<3;j++)
      printf("%d\t",c[i][j]);
      printf("\n");
      }
       printf("\n Response is..\n");
      for(i=0;i<3;i++)
      {
      for(j=0;j<3;j++)
      printf("%d\t",d[i][j]);
      printf("\n");
      }
     
      getch();
}
     
     

Friday, September 9

LEX Program to identify Keywords and convert it into uppercase


Guys, apply simple logic. Detect all keywords( This program deal with a small number of keywods for sake of simplicity).
On detecting any keyword in C, convert it into uppercasr letter using the funtion 'toupper' . Game over!!




%{#include<stdio.h>
int i;

%}keyword main|int|scanf|printf|if|else
%%

{keyword} {
 for(i=0;i<yyleng;i++)
 printf("%c",toupper(yytext[i]));
   }

%%

main()
{
yyin=fopen("num.c","r");
yylex();
}


int yywrap()
{
return 1;
}

OutputLet num.c contains following program fragment.

main()
{
int num;
scanf("%d",&num);
if(num%2)printf("Odd");
else printf("Even")
}


The output will be,

MAIN()
{
INT num;
SCANF("%d",&num);
IF(num%2)PRINTF("Odd");
ELSE PRINTF("Even")
}





LEX Program to eliminate all whitespaces

Hi Guys,
This lex program is aimed to eliminate all whitespaces from an input file. As u think, this is not at all a difficult job. We have to simply detect single blank ' ' or tab '\t' or a newline '\n' and delete them in output. That's all..!!!!



%{
#include<stdio.h>
%}

%%
[\n\t ' '] {};
%%
main()
{
yyin=fopen("myfile.txt","r");
yylex();

}
int yywrap()
{
return 1;
}

____________________________________________________________________
Look @ the example:

Basic datatypes in C are:
int   char  float   double

output will be

BasicdatatypesinCare:intcharfloatdouble




.

LEX Program to delete all comments


No Comments  :)


This lex program is intended to eliminate comments from a C program. This task is simple since in a C program, comments will be associated only with '//' or '/*...*/ only. So our aim is to detect the occurence of these characters and ignore subsequent comments.



%{
#include<stdio.h>
%}


%%

\/\/.* ;
\/\*(.*\n)*.*\*\/ ;

%%

main()
{
yyin=fopen("mypgm.c","r");
yylex();
}


int yywrap()
{
return 1;
}





\/\/.* ; eliminates single line coments. i.e., comments of the form ' //comment.. .. .. ;'
It simply look on '/'immediately followed by another '/' and ignore that line.

\/\*(.*\n)*.*\*\/ ; eliminates multiple comments. i.e, code fragment lies within /*...*/


Have  a look on this Example:

Consider mypgm.c

//This is a single comment;
This is not a comment;
/*But..
These are mulptiple comments
*/
Again, It is not a comment


The output will be,

This is not a comment;
Again, It is not a comment

LEX Program to count the number of lines, words and letters


Howdy guys,

Lets have a look on how a Lex programs works using a simple example.

This sample programs counts the number of lines, words and characters in a text file.


 
Lex programming is not rocket science. You have to just apply an eight year old kid's logic. Yes, you read right. Only a school kid's logic.

LOGIC

Read each character from the text file :

  • Is it a capital letter in English? [A-Z] : increment capital letter count by 1.
  • Is it a small letter in English? [a-z] : increment small letter count by 1
  • Is it [0-9]? increment digit count by 1.
  • All other characters (like '!', '@','&') are counted as special characters
  • How to count the number of lines? we simply count the encounters of '\n' <newline> character.that's all!! 
  • To count the number of words we count white spaces and tab character(of course, newline characters too..)

 Alignment of a Lex program is very simple and it makes the logic more vivid.



counter.l
%{
#include<stdio.h>
int lines=0, words=0,s_letters=0,c_letters=0, num=0, spl_char=0,total=0;
%}
%%


 
\n { lines++; words++;}
[\t ' '] words++;
[A-Z] c_letters++;
[a-z] s_letters++;
[0-9] num++;
. spl_char++;
%%





main(void)
{
yyin= fopen("myfile.txt","r");
yylex();
total=s_letters+c_letters+num+spl_char;
printf(" This File contains ...");
printf("\n\t%d lines", lines);
printf("\n\t%d words",words);
printf("\n\t%d small letters", s_letters);
printf("\n\t%d capital letters",c_letters);
printf("\n\t%d digits", num);
printf("\n\t%d special characters",spl_char);
printf("\n\tIn total %d characters.\n",total);
}
 
int yywrap()
{
return(1);
}


Sample output



 Let the 'myfile.txt' contains this.

                         This is my 1st lex program!!!
                         Cheers!! It works!!:)

The output will be


This file contains..
2 lines
9 words
30 small letters
3 capital letters
1 digits
9 special characters
In total 43 characters.



Thursday, September 1

HOW TO INSTALL MATLAB in Windows 7 ???


MatLab is a software by which  you can write nice little programs  and produce pretty pictures and graphs!! It has already inbult functions based on C,C++ and Java etc. We can directly use them or we can develop our own. This language contain programming, graphical used interface, simulink and Animations,coming to electronics ...u have signal procesing, image processing, communications and other related topics directly in the MATLAB.

            In this post, let us have a look on how to install MatLab in Windows 7 !!

 Installation of Matlab requires two sections, one activation with License code and next activation with .dat file. The complete steps are as follows:
  1. Find  the SETUP file.( Usually inside matlab --> win32). 

2. Double click setup.exe

3.Generally two options will be provided:
                  - Install automatically using the internet.
                  - Install manually without using the internet.

4. Select to install manually without the Internet.



5. On clicking " Next " button, the installer will prompt you to enter the License key.


6.Enter the License key provided within the crack  ( .txt file)


7.Click "Next" --> Choose "Typical installation".


8. Installation begins.(usually it will take 10-15 minutes).


9. After this installation, some activation is needed.(This step makes little confusion for many people that reinstallaion being occuring here. Actually this time installer demands a .dat file for activation).




10. Select "continue"--> "Activate manually without the Internet".

11. installer will prompt you to enter the License file.


12. Click 'Browse' and provide path to the License file.


13. Usually it is available inside the folder "Crack" in the DVD).




14. Choosing the License File:: Users who gave the Key for 'standalone version' may use the file 'Lic_StandAlone.dat' and those gave the key for 'server edition' may give the License file 'Lic_server.dat'.




15. On selecting License file, installation get completed .



    

 Still have doubt about Matlab installation???  Click here for more details...