Monday, 13 June 2016

D S - I.pdf




just click on "Open this in new window", and then the pdf will open....then click on download button

Or simply copy/open the link and click download button...
https://drive.google.com/file/d/0B_dVT88kjhz7ZXYzQzVxN1YwMU0/view?usp=sharing

link of DS-I

Tuesday, 31 May 2016

Addition and Subtraction of Matrix

//Addition and Subtraction of Matrix..

#include<stdio.h>
main()
{
int a[10][10], b[10][10], s[10][10],sub[10][10];
int r,c,r1=0, c1=0, r2=0, c2=0;

printf("Enter row no.    ");
scanf("%d",&r1);
printf("Enter column no. ");
scanf("%d",&c1);
printf("Enter the elements of first array");
for(r=0; r<r1; r++)
{
   for(c=0; c<c1; c++)
   {
       scanf("%d",&a[r][c]);
   }
}

printf("Enter row no.    ");
scanf("%d",&r2);
printf("Enter column no. ");
scanf("%d",&c2);

if(r1==r2 && c1==c2)
{
printf("Enter the elements of second array");
for(r=0; r<r2; r++)
{
   for(c=0; c<c2; c++)
   {
      scanf("%d",&b[r][c]);
   }
}

//addition & subtraction
for(r=0; r<r1; r++)
{
   for(c=0; c<c1; c++)
   {
       s[r][c] =  a[r][c]+b[r][c];
       sub[r][c]= a[r][c]-b[r][c];
   }
}

printf("Additiom is\n");
for(r=0; r<r1; r++)
{
   for(c=0; c<c1; c++)
   {
       printf("%d\t",s[r][c]);
   }
   printf("\n");
}
printf("\n\n");

printf("Subtraction is\n");
for(r=0; r<r1; r++)
{
   for(c=0; c<c1; c++)
   {
       printf("%d\t",sub[r][c]);
   }
   printf("\n");
}
}
else
{
    printf("Invalid matrix");
}
}

Tuesday, 17 May 2016

// Inserting an element in an array

#include<stdio.h>

main()
{
void insert(int[],int,int,int);

int x=0,p,top,i;
int a[20];

printf("Enetr the no. of elements you wanna insert(max 20)");
scanf("%d",&top);

printf("Enter elements in array");
for(i=0; i<=top-1; i++)
{
   scanf("%d",&a[i]);
}

printf("\nEnter the element to insert in array");
scanf("%d",&x);
printf("\nEnter the position to enter the element");
scanf("%d",&p);

if(p==19)
printf("array full");
else
insert(a,p,x,top);
}

void insert(int b[], int p, int x, int t)
{
int i=0;
for(i=0; i<=t-1; i++)
printf("%d",b[i]);
for(i=t-1; i>=p-1; i--)
{
  b[i+1]=b[i];
}
  b[p-1]=x;
for(i=0; i<=t; i++)
   printf("%d ",b[i]);
}


Tuesday, 12 April 2016

area and radius of circle using function12-04-16

#include<stdio.h>
main()
{
float circle(int);     //function declaration
int square(int);       //function declaration   

int rad, side;


printf("Enter the length of side of square  ");
scanf("%d",&side);
                         
printf("area of square is %d\n",square(side));  //call of function

printf("Enter the rad of circle  ");
scanf("%d",&rad);
                          
printf("area of circle is %f\n",circle(rad));  //call of function
}

int square(int a)          //definition
{
int area;
area = a*a;
return(area);
}

float circle(int b)       //definition
{
float area;
area = 3.14*b*b;
return(area);
}

#include<stdio.h>
main()
{
int fact(int);

int c,z;
printf("factorial of a number is %d",fact(c));
}

int fact(int ft)
{
int i,a;
ft=1;
printf("Enter a number to print factorial of ");
scanf("%d",&a);
for(i=1; i<=a; i++)
ft = ft*i;
return(ft);
}

Monday, 14 September 2015

My Way to L.N.C.T. Bhopal

I will write in both Hindi and English....
So today is the day i started my first Blog ... and recently i started my college life  too...
So lets start with college life.....i.e; college life experience....what you thought and and what you got.
(haha its happen with most of us....)

So my college...it's L.N.C.T. (Lakshmi Narayan College Of Technology). It is a college just by name...By rules & regulations and method of working its a high level school (not High Schools) an Engineering school.
Lets Start it from the beginning...how i ended up here in LNCT


I went to Kota in 2014 for engineering coaching. I took admission in Career Point. After 5-6 months i was clear about not doing further engineering study. So i thought to study BCA (Bachlor of computer Application). so after spending total nine months in Kota i returned back to my home. Here i had my class 12 board (BSEB) exams in feburary. I got total 73.2% marks in BSEB. so now the time was to look for a college offering BCA stuudy. I started searching and ended up searching some famous and some above average colleges. Since i was not able to spend lots of money. so i choose a college named DSVV (Dev Sanskriti Vishwavidalaya) Haridwar, with total expense of  rs 80000 per year. Since all the admission process starts in late may-june.All i have to do was wait, but the discussion and contradiction between BCA and B Tech (i.e; engineering) was still going on with my parents and family members. Some one says BCA is better, some one says B Tech is more better. I got confused too. But i was stuck to BCA.  

So for rest of story of ''my way to lnct''.... please visit tomorrow again.
thanks for giving your time
you can share your story of "way to 'your college'" too.. here.
It's CHANDRAKANT KUMAR thanking you again... 
जय  हिन्द