Wednesday, 28 August 2019

What is computer organization?

Computer organization is concerned with the way of the hardware components operate and the way they are connected togather to from the computer system. The various components are assumed.
" To setup between hardware, operating       system and software is known as computer organization. "

On the other hand we can say computer organization, after completing the physical structure of the computer system. We have to setup every device component on a suitable location and according to the sequential order.
After connecting all the devices to eachother we have to supply functionality means the system is operend by operator system (is called system software) and to execute the program (is called application software)
Means-
The operating system is the interface between the software and hardware this whole phenomena.

Monday, 26 August 2019

How to write a program to multiply two matrics?

#include<stdio.h>
#include<conio.h>
void main()
{
   int a[i][j], b[i][j], c[i][j], I, j, k;
   int sum=0;
   clrscr();
   printf("nEnter the first matric:n");
    for(i= 0; i<3; i++)
    {
       for(j= 0; j<3; j++)
       scanf("%d", &a[i][j]);
     }    
printf("nEnter the second matric:n");         for(i= 0; i<3; i++)
    {
       for(j= 0; j<3; j++)
       scanf("%d", &b[i][j]);
     }    
printf("The first matric is:n");
  for(i= 0; i<3; i++);
      {
            for(j= 0; j<3; j++)
            printf("%d", a[i][j]);
            printf ("n");
       }
printf("The second matric is:n");
   for(i= 0; i<3; i++)
      {
         for(j= 0; j<4; j++)
         printf("%d", a[i][j]);
         printf ("n");
     }
        for(i= 0; i<3; i++)
       for(j= 0; j<=2; j++)
     {
        sum= 0;
        for(k= 0; k<=2; k++)
        sum= sum+ a[i][j]*b[i][j];
        sum=c[i][j];
     }
printf("The multiplication of two matrics:nn");
         for(i= 0; i<3; i++)
    {
       for(j= 0; j<3; j++)
      printf("%d ", c[i][j]);
       printf ("n");
    }
getch();
}

Thursday, 8 August 2019

What is storage classes??

The register Storage Class         

The register storage class is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).
 

The static Storage Class

The static storage class instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope. Therefore, making local variables static allows them to maintain their values between function calls.

The static modifier may also be applied to global variables. When this is done, it causes that variable's scope to be restricted to the file in which it is declared.

In C programming, when static is used on a class data member, it causes only one copy of that member to be shared by all the objects of its class.