Friday, 14 November 2014

Tips to get pass mark in Anna university semester examinations :

                Hi and hello poor innocent guys over there .... This is me one of the Engineering student under so called Anna university as like you guys..

                    I finished my degree without any history of arrear that means no arrear in each semester pulse I got placed in the campus itself so here I am to share my success tips to over come the Anna university semester exams..

                      Look guys Anna university is the easiest and simple place where one can get pass with little effect and smart work. The first and the for most likely important thing to do is please for God sake keep your internal make up to 14 because it help you to get through. Don't worry if you don't have much, 10 is more than enough. I cleared all semester with internals 10.

                        For 16 mark questions please refer the previous year questions.
Study only those that repeat. Two 16 mark question from each unit will make.

                        For 2 marks read only those that are in the question bank book. This will make. Please don't ignore 2 mark question from reading this is so needed if you wish to get passed.

                          Then the last thing, just fu*k the seat and sit for the exam let the fate decide......











                  
          

Sunday, 27 July 2014

Life as an Engineering Student..... Dreaming huge....

Bla bla bla... have heard so much about the dreams the struggles of many engineering guys out there.. Its not that easy to be a engineer as you all guys non-engineers think off.. me myself an engineering student from the a university were lakhs of students fall. Here is how their life starts.
                                                                             Its their Daddy's OMG who make them to join 3 to 4 tuition's during their 11th and 12th waking up 3.30 am in the mid night not early morning you shits.. when they reach there, there comes the midnight test in the tuition which was useless and the results of the previous test will be shown immediately after today's test ... here come the fun part those who fail in that are asked to stay out side the tuition that is they provide a special area for those special guys like us and are made to write those test questions with answer 15 times while the tuition goes on inside, we keep on writing.. so it was like waking up early in the morning for assignment training.....LOL
                          Finally came the public exam results... To be continued

Sunday, 4 May 2014

Amazing Spider-Man 2 Review:



Wow its time for part 2 . There were 3  villains Electro, Green Goblin and Raino dont think that all the three have a big fight all together only the electo was the main villain and the green guy came for 10 min after electro was defeated by our hero and the Raino was just like a joke came for only last 15 seconds were spiderman and raino ran towards each other to fight and suddenly the film ends showing that spider man will save the people no matter what the villains are..!!!!



Finally: Super visuals and a great treat for spiderman fans....!!!

Tuesday, 29 April 2014

Java program for Border Gateway Protocol(BGP):

package bgp;
import java.util.*;
public class rout
{
    public static void main(String[] args)
    {
     int i,j,k;
     int a[][]=new int[10][10];
     int b[][]=new int[10][10];
     Scanner z=new Scanner(System.in);
     System.out.print("Enter the number of nodes :");
     int n=z.nextInt();
     for(i=0;i<n;i++)
     {
         for(j=0;j<n;j++)
         {
             System.out.println("Enter the distance between the host"+(i+1)+"-"+(j+1));
             a[i][j]=z.nextInt();
         }
     System.out.println("\nThe matrix is:");
     }
     for(i=0;i<n;i++)
     {
         for(j=0;j<n;j++)
            
         {
             System.out.print(a[i][j]+"\t");
         }
         System.out.println();
     }
     for(k=0;k<n;k++)
     {
         for(i=0;i<n;i++)
         {
             for(j=0;j<n;j++)
             {
                 if(a[i][j]>a[i][k]+a[k][j])
                 {
                     a[i][j]=a[i][k]+a[k][j];
                 } 
             }
            
          }
     }
     for(i=0;i<n;i++)
     {
         for(j=0;j<n;j++)
         {
             b[i][j]=a[i][j];
             if(i==j)
             {
                 b[i][j]=0;
               
             }
         }
     }
     System.out.println("\nThe output matrix is:");
     for(i=0;i<n;i++)
     {
         for(j=0;j<n;j++)
         {
             System.out.print(b[i][j]+"\t");
         }
         System.out.println("\n");
     }
     }

}

Embedded System portions for Anna University:


IT2354 EMBEDDED SYSTEMS L T P C
 3 0 0 3

UNIT I EMBEDDED COMPUTING 9
Challenges of Embedded Systems – Embedded system design process. Embedded
processors – 8051 Microcontroller, ARM processor – Architecture, Instruction sets and
programming.

UNIT II MEMORY AND INPUT / OUTPUT MANAGEMENT 9
Programming Input and Output – Memory system mechanisms – Memory and I/O
devices and interfacing – Interrupts handling.

UNIT III PROCESSES AND OPERATING SYSTEMS 9
Multiple tasks and processes – Context switching – Scheduling policies – Interprocess
communication mechanisms – Performance issues.

UNIT IV EMBEDDED SOFTWARE 9
Programming embedded systems in assembly and C – Meeting real time constraints –
Multi-state systems and function sequences. Embedded software development tools –
Emulators and debuggers.

UNIT V EMBEDDED SYSTEM DEVELOPMENT 9
Design issues and techniques – Case studies – Complete design of example embedded
systems.

Monday, 28 October 2013

C Program for the Implementation of a Simple Text Editor with featuress like Insertion, Deletion | CS1207 - System Software Laboratory

AIM:
      To write a "C" program to implement "Text Editor" with features like insertion, deletion in CS1207 - System Software Lab.

ALGORITHM:

1.Display options new, open and exit and get choice.
2.If choice is 1 , call Create() function.
3.If choice is 2, call Display() function.
4.If choice is 3, call Append() function.
5.If choice is 4, call Delete() function.
6.If choice is 5, call Display() function.
7.Create()
    7.1 Get the file name and open it in write mode.

    7.2 Get the text from the user to write it.
8.Display()
    8.1 Get the file name from user.
    8.2 Check whether the file is present or not.
    8.2 If present then display the contents of the file.
9.Append()
    9.1 Get the file name from user.
    9.2 Check whether the file is present or not.
    9.3 If present then append the file by getting the text to add with the existing file.
10. Delete()
    10.1 Get the file name from user.
    10.2 Check whether the file is present or not.
    10.3 If present then delete the existing file.

SOURCE CODE:

#include<stdio.h>
#include<conio.h>
#include<process.h>
int i,j,ec,fg,ec2;
char fn[20],e,c;
FILE *fp1,*fp2,*fp;
void Create();
void Append();
void Delete();
void Display();
void main()
{
 do {
  clrscr();
  printf("\n\t\t***** TEXT EDITOR *****");
  printf("\n\n\tMENU:\n\t-----\n ");
  printf("\n\t1.CREATE\n\t2.DISPLAY\n\t3.APPEND\n\t4.DELETE\n\t5.EXIT\n");
  printf("\n\tEnter your choice: ");
  scanf("%d",&ec);
  switch(ec)
  {
   case 1:
     Create();
     break;
   case 2:
     Display();
     break;
   case 3:
     Append();
     break;
   case 4:
     Delete();
     break;
   case 5:
     exit(0);
  }
 }while(1);
}
void Create()
{
 fp1=fopen("temp.txt","w");
 printf("\n\tEnter the text and press '.' to save\n\n\t");
 while(1)
 {
  c=getchar();
  fputc(c,fp1);
  if(c == '.')
  {
   fclose(fp1);
   printf("\n\tEnter then new filename: ");
   scanf("%s",fn);
   fp1=fopen("temp.txt","r");
   fp2=fopen(fn,"w");
   while(!feof(fp1))
   {
    c=getc(fp1);
    putc(c,fp2);
   }
   fclose(fp2);
   break;
  }}
}
void Display()
{
  printf("\n\tEnter the file name: ");
  scanf("%s",fn);
  fp1=fopen(fn,"r");
  if(fp1==NULL)
  {
   printf("\n\tFile not found!");
   goto end1;
  }
  while(!feof(fp1))
  {
   c=getc(fp1);
   printf("%c",c);
  }
end1:
  fclose(fp1);
  printf("\n\n\tPress any key to continue...");
  getch();
}
void Delete()
{
  printf("\n\tEnter the file name: ");
  scanf("%s",fn);
  fp1=fopen(fn,"r");
  if(fp1==NULL)
  {
   printf("\n\tFile not found!");
   goto end2;
  }
  fclose(fp1);
  if(remove(fn)==0)
  {
   printf("\n\n\tFile has been deleted successfully!");
   goto end2;
  }
  else
   printf("\n\tError!\n");
end2: printf("\n\n\tPress any key to continue...");
  getch();
}
void Append()
{
  printf("\n\tEnter the file name: ");
  scanf("%s",fn);
  fp1=fopen(fn,"r");
  if(fp1==NULL)
  {
   printf("\n\tFile not found!");
   goto end3;
  }
  while(!feof(fp1))
  {
   c=getc(fp1);
   printf("%c",c);
  }
  fclose(fp1);
  printf("\n\tType the text and press 'Ctrl+S' to append.\n");
  fp1=fopen(fn,"a");
  while(1)
  {
   c=getch();
   if(c==19)
    goto end3;
   if(c==13)
   {
    c='\n';
    printf("\n\t");
    fputc(c,fp1);
   }
   else
   {
    printf("%c",c);
    fputc(c,fp1);
   }
  }
end3: fclose(fp1);
  getch();
}

Implementation of a Single Pass Macro Processor using C programming..

Single Pass Macro Processor


/* Macro Processor */

#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<string.h>
int m=0,i,j,flag=0;
char c,*s1,*s2,*s3,*s4,str[50]=" ",str1[50]=" ";
char mac[10][10];
void main()
{
FILE *fpm=fopen("macro.txt","r");
FILE *fpi=fopen("minput.txt","r");
FILE *fpo=fopen("moutput.txt","w");
clrscr();
while(!feof(fpm))
{
fgets(str,50,fpm);
s1=strtok(str," ");
s2=strtok(NULL," ");
if(strcmp(s1,"MACRO")==0)
{
strcpy(mac[m],s2);
m++;
}
s1=s2=NULL;
}
fgets(str,50,fpi);
while(!feof(fpi))
{
flag=0;
strcpy(str1,str);
for(i=0;i<m;i++)
{
if(strcmp(str1,mac[i])==0)
{
rewind(fpm);
while(!feof(fpm))
{
fgets(str,50,fpm);
s2=strtok(str," ");
s3=strtok(NULL," ");
if(strcmp(s2,"MACRO")==0&&strcmp(s3,str1)==0)
{
fgets(str,50,fpm);
strncpy(s4,str,4);
s4[4]='\0';
while(strcmp(s4,"MEND")!=0)
{
fprintf(fpo,"%s",str);
printf("\n####%s",str);
fgets(str,50,fpm);
strncpy(s4,str,4);
s4[4]='\0';
}
}
}
flag=1;
break;
}
}
if(flag==0)
{
fprintf(fpo,"%s",str);
printf("%s",str);
}
fgets(str,50,fpi);
}
fclose(fpm);
fclose(fpi);
fclose(fpo);
getch();
}

Input Files : 

Macro.txt

MACRO ADD1
MOV A,B
ADD C
MEND
MACRO SUB1
STORE C
MEND

MInput.txt

MOV B,10
MOV C,20
ADD1
MUL C
SUB1
END

MOutput.txt

MOV B,10
MOV C,20
MOV A,B
ADD C
MUL C
STORE C
END