Skip to main content

Search This Blog

matrix multiplication in c using functions and pointers

 #include <stdio.h> #define ROWS 3 #define COLS 3 void matrixMultiply(int *mat1, int *mat2, int *result, int rows1, int cols1, int cols2) {     int i, j, k;     // Multiplying matrices     for (i = 0; i < rows1; i++) {         for (j = 0; j < cols2; j++) {             *(result + i * cols2 + j) = 0;             for (k = 0; k < cols1; k++) {                 *(result + i * cols2 + j) += *(mat1 + i * cols1 + k) * *(mat2 + k * cols2 + j);             }         }     } } void displayMatrix(int *mat, int rows, int cols) {     int i, j;     // Displaying matrix     for (i = 0; i < rows; i++) {         for (j = 0; j < cols; j++) {             printf("%d\t", *(mat + i * cols + j)); ...

What is Compiler in C




What is Compiler

Compile is a converting programming language into machine language.we are written a simple English language and computers do not understand the English language. 
The source file written in the code human-readable ASCII text file (Source File).  The computer read 0 and 1 format.
The compiler human-readable code or text file, image file, and any file convert into machine language after the processing computer in this language.

it got to have complied in machine language because computer read-only binary number format is 01010101.
The compiler converts the  ASCII text file (Source File) human-readable into machine language.
Compiler may be a software which converted program file into binary format in a single step.
In simple words, the compiler may be a software which may take input from other language and converted into Low-Level Language (Machine Language) machine dependent language.
Process of Translation
You have written the program subsequent step is to save lots of the program during a file with extension. c.
This program is in application-oriented language. But this language isn't understood by the pc. So, the subsequent step is to convert the application-oriented language program (source code) to machine language (object code). This task is performed by a software or program referred to as a compiler.
Every language has its own compiler that converts the ASCII text file to code. The compiler will compile the program successfully if the program is syntactically correct.
The object code won't be produced. 
A compiler is system software that converts programming language code into binary format in single steps. In other words the compiler is a system software that can take input from any other programming language and convert it into a language-dependent on a lower level machine.



Comments

Popular posts from this blog

Bcsl-043 java sem4

Ignou question paper java java Java Solution BCSL 43 dec2016 solution Video BCSL 43 june2016 Solution Video BCSL 43 dec2015 Solution Video BCSL 43 june2015 Solution video BCSL 43 dec2014 Solution Video BCSL 43 june2014 Solution Video BCSL 43 dec2013 Solution Video BCSL43 june2013 Solution Video Dec2016  1.Write a Java program to create an applet to find the simple interest on a given amount, rate of interest and duration. Use proper GUI components in your program. import java.util.*; import java.awt.*; import java.awt.event.*; import java.applet.Applet; /* */ public class simpleinterest extends Applet{ Label l1,l2,l3,l4; TextField t1,t2,t3; Button b1; Image picture; public void init(){ picture = getImage(getCodeBase(),"20160613_091125.jpg"); l1=new Label("Enter the Amount "); l2=new Label("Enter the Rate "); l3=new Label("Enter interest Duration :"); l4=new Label(...

Here you get a leave from the office to have a physical relationship, know why the government has made this unique rule

Here you get a leave from the office to have a physical relationship, know why the government has made this unique rule   There is an official holiday for having a physical relationship, are you surprised to read the headline? But this is true. There is a country where people get leave to have physical relationship. Let us tell about that country and what is the reason behind it. Relationship Desk . The meeting of two hearts or the establishment of a physical relationship between them is a moment. Why would a leave be given for this? But you will find it strange to know that there is a country where the government has made a provision of leave for this. People get leave from office to have sex. The name of that country is Denmark. Yes, this facility has been given to the people in this country. Actually, the decreasing population of Denmark has been a matter of concern for the government there. From time to time, the government there runs such campaigns. Due to which people get the...

Contact Form

Name

Email *

Message *