sign up I login
 advanced
refer a friend - earn nickels!!

Ask & Discuss Questions with Community & Experts

Moderation Team
 90 chars left    advanced
Ask iit jee aieee pet cbse icse state board community Community Discussion Question: c language question
Forum Index -> Computer Science like the article? email it to a friend.  
Author Message
danny_007 (51)

Scorching goIITian

Olaaa!! Perrrfect answer. 7  [15 rates]

danny_007's Avatar

total posts: 238    
offline Offline

firstly i have not done C++ , so please answer this question in C language , use #include<stdio.h> and <conio.h> only


Q1)Form 2 , 2x2 matrix and add them to form a 3rd matrix


Q2)Write a program to find transpose of a 2x2 and 3x3 matrix


rates assured!!

    
pratik20990 (137)

Hot goIITian

Olaaa!! Perrrfect answer. 19  [40 rates]

pratik20990's Avatar

total posts: 155    
offline Offline

transpose of matrix



#include<stdio.h>

#include<conio.h>



void main()

{

int a[2][2], b[2][2];

read(a);

transpose(a,b);

print(b);

getch();

}

 

read(m)

int m[][2];

{

int i, j;

 

for(i=0;i<2;i++)

  for (j=0; j<2;j++)

scanf("%d", &m[i][j]);

}

 

transpose(a,b)

int a[][2], b[][2];

{

int i, j;

 

for(i=0;i<2;i++)

for (j=0; j<2;j++)

{

  b[j][i]=a[i][j];

}

}

 

print(m)

int m[][2];

{

int i,j;

for(i=0;i<2;i++)

{

for (j=0; j<2;j++)

  printf("%d  ", m[i][j]);

printf("\n");

 

}


pls rate......


 this reply: 5 points  (with Olaaa!! Perrrfect answer.   in 1 votes )   [?]
 
You have to be logged on to rate
  
pratik20990 (137)

Hot goIITian

Olaaa!! Perrrfect answer. 19  [40 rates]

pratik20990's Avatar

total posts: 155    
offline Offline
for 3X3, replace 2 with 3 in the program
 this reply: 2 points  (with Olaaa!! Perrrfect answer.   in 1 votes )   [?]
 
You have to be logged on to rate
  
RyuAmakusa (942)

Blazing goIITian

Olaaa!! Perrrfect answer. 154  [240 rates]

RyuAmakusa's Avatar

total posts: 640    
offline Offline

hmmmmmmmmmmm................ok......................now..................see...................i am not trying to find fault or something i have not gone through the code fully but i am sure that it will give more than1 error when it is compiled..........can any 1 tell the reason....

 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
 
Forum Index -> Computer Science
Go to:   

 Aakash Institute IIT/ AIEEE/ Medical Crash Course
Name  
E-mail  
Phone  
Mobile  
** Hurry. Exclusive goIIT Offer. Limited Seats Only!
available in: New Delhi, Amritsar, Bhatinda, Bokaro, Chandigarj, Dehradun, Guwhati, Hyderabad, Indore, Jaipur, Kanpur, Karnal, Kolkata, Kota, Lucknow, Ludhiana, Mumbai, Noida, Patiala, Patna, Pune, Ranchi, Varanasi
Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Aakash-IITJEE : AIEEE
Aakash-IITJEE : DCE
Aakash-IITJEE : MHTCET
Aakash Institute : AIPMT
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya