CprogrammingInterviewquestionsandanswers:Cprogramtofindinverseofamatrix
Clanguageinterviewquestionssolutionforfreshersbeginnersplacementtrickygoodpointersanswersexplanationoperatorsdatatypesarraysstructu
recursionpreprocessorsloopingfilehandlingstringsswitchcaseifelseprintfadvancelinuxobjectivemcqfaqonlinewrittentestprimenumbersArmst
seriesfactorialpalindromecodeprogramsexamplesonc++tutorialsandpdf
Ctutorial
CProgrammingQuestions
CInterviewQuestions
CPrograms
CTest
Cprogrammingpdf
Programofc++
SqlServer
CQUESTIONSANDANSWERS
Search
Cprogramexamples
Cinterviewquestionsandanswers
Datatypequestions
Variablenamingrulequestions
Operatorsquestions
LABELS
Controlflowquestions
Advancenc
Switchcasequestions
Loopingquestions
Arrayinc
Cprogramtofindinverseofamatrix
C++
Pointerquestions
Datatypes
Stringquestions
Exact
Printf,Scanfquestions
Preprocessorquestions
Structurequestions
Commadlineargument
CquestionsinLinux
Conlinetest
FileHandling
Functiontutor
Howtofindinverseofamatrixinc
Ccodetofindinverseofamatrix
Inverseofa3x3matrixinc
#include<stdio.h>
Java
linuxquestion
Loopinginc
MemoryMapp
Operators
intmain(){
pdf(11)
inta[3][3],i,j
floatdeterminant=0
Preprocessor
Cmixedpracticesets
Ctrickyquestions
Cprograms
Pointers
SQL
Exampleofrecursioninc
Cprogrammingforums
printf("Enterthe9elementsofmatrix:")
for(i=0i<3i++)
for(j=0j<3j++)
scanf("%d",&a[i][j])
printf("\nThematrixis\n")
for(i=0i<3i++){
printf("\n")
for(j=0j<3j++)
printf("%d\t",a[i][j])
}
PAGEVIEWS
8 0
CLOVERCOM
withGoogleFrie
Members
for(i=0i<3i++)
determinant=determinant+(a[0][i]*(a[1]
[(i+1)%3]*a[2][(i+2)%3]a[1][(i+2)%3]*a[2][(i+1)%3]))
printf("\nInverseofmatrixis:\n\n")
for(i=0i<3i++){
for(j=0j<3j++)
printf("%.2f\t",((a[(i+1)%3][(j+1)%3]*a[(i+2)%3]
[(j+2)%3])(a[(i+1)%3][(j+2)%3]*a[(i+2)%3][(j+1)%3]))/
determinant)
printf("\n")
}
http://www.cquestions.com/2011/09/cprogramtofindinverseofmatrix.html
Alreadyamemb
SUBSCRIBEV
Enteryoure
1/4
9/3/2015
CprogrammingInterviewquestionsandanswers:Cprogramtofindinverseofamatrix
return0
}
Enterthe9elementsofmatrix:3
5
2
1
5
8
3
9
2
Deliveredb
STANDARDO
?
Vote
Votessofar:
Dayslefttovote
Thematrixis
352
158
392
Inverseofmatrixis:
0.700.250.07
0.090.000.14
0.340.250.11
CTUTORIAL
Alogrithm:
**
Memorymappingtutorialinc
Variablestutorialinc
Datatypestutorialinc
Storageclassestutorialinc
Loopingtutorialinc
Pointerstutorialinc
Functiontutorialinc
Arraytutorialinc
Preprocessortutorialinc
Advancedctutorial
POPULARPOSTS
Cprogramexamples|Interview
CompleteList
1.Writeacprogramforadditionoftwomatrices.
2.Writeacprogramforsubtractionoftwomatrices
3.Writeacprogramformultiplicationoftwomatrices.
4.Writeacprogramtofindoutsumofdiagonalelementofamatrix.
5.Writeacprogramtofindouttransportofamatrix.
6.Writeacprogramforscalarmultiplicationofmatrix.
7.Cprogramtofindinverseofamatrix
8.Lowertriangularmatrixinc
9.Uppertriangularmatrixinc
10.Strassen'smatrixmultiplicationprograminc
11.Cprogramtofinddeterminantofamatrix
12.Biglistofcprogramexamples
Cinterviewquestionsandanswers
Programtoconvertdecimaltobinaryin
c
Checkgivennumberisprimenumber
ornotusingcprogram
Findouttheperfectnumberusingc
program
14comments:
Anonymous 4/29/12,12:42PM
iamnewtoprogramming.cananyoneplsexplainthistome.offerurhelpassoonaspossible
QUICKSORTUSINGCPROGRAM
Reply
TOFINDFIBONACCISERIESUSING
CPROGRAM
RonaldMichaels 8/10/12,9:36PM
TOFINDFACTORIALOFANUMBER
USINGCPROGRAM
Checkthegivennumberisarmstrong
numberornotusingcprogram
Programaboveprintstransposeofinverse.
seebelowrevisedcode
printf("\nInverseofmatrixis:\n\n")
http://www.cquestions.com/2011/09/cprogramtofindinverseofmatrix.html
2/4
9/3/2015
CprogrammingInterviewquestionsandanswers:Cprogramtofindinverseofamatrix
Writeacprogramtoreverseastring
CPROGRAMMINGQUESTIONSAND
ANSWER
Cquestionsandanswers
Cinterviewquestionsandanswers
Debuggingquestionsincwithanswers
Aptitudequestionsandanswersinc
Cbasicquestions
Therewasanerrorinthisgadget
//for(i=0i<3i++){
//for(j=0j<3j++)
for(j=0j<3j++){
for(i=0i<3i++){
printf("%.2f\t",((a[(i+1)%3][(j+1)%3]*a[(i+2)%3][(j+2)%3])
(a[(i+1)%3][(j+2)%3]*a[(i+2)%3][(j+1)%3]))/determinant)
}
printf("\n")
}
Reply
Khal 12/18/12,9:51PM
whatabout2by2??
133
Reply
damd 1/3/13,8:51PM
insteadof3use2.yuneedtoreplacedemby2!
andalsodontforgettoinitialisest[2]
Reply
Anonymous 1/28/13,9:51AM
Isprogramcorrectlyworkornot?
Reply
Replies
VenkiChelladurai 12/13/13,5:50AM
itworksitriedit
Reply
humzatufail 1/29/13,12:18AM
yescorectlyworkthanksritesh:)
Reply
Anonymous 2/10/13,12:55AM
Good,butforamatrixitisalsoimportantthatitsdeterminantmustbenonzeroforexistenceofinverse.
Thusitwillbegoodtoincludeonemoreconditionsoitwillimmediatelytellwhetherthematrixenteredis
validornot.
Restofthethingsareokay:)
Reply
Anonymous 3/11/13,8:35AM
iwant2*2programmenow!pleaseeeeee.
Reply
Anonymous 7/19/13,12:11AM
Itdoessomeapproximationsmakingituseless.0.04getsroundedtozero.0.06getsroundedto0.1
Reply
Anonymous 12/1/13,1:45AM
if u want higher accuracy in the digits, then replace %.2f with %.10f and you will have 10 digits of
accuracyinsteadof2
Reply
Anonymous 4/30/14,2:10PM
HOWABOUT6X6MATRIX?
http://www.cquestions.com/2011/09/cprogramtofindinverseofmatrix.html
3/4
9/3/2015
CprogrammingInterviewquestionsandanswers:Cprogramtofindinverseofamatrix
Reply
KamranKhan 11/22/14,2:06PM
whyyouuse%3findingdeterminant
Reply
j.prasannakumar 1/19/15,10:30PM
writeacprogramtodisplaytheelementsinthematrixfromanystartingpointitshouldtravelupsidedown
andalsowanttoendatstartingpoint.
plshelpme@richardprasanna@outlook.com
Reply
Enteryourcomment...
Commentas:
Publish
subhasreekonar(Google)
Signout
Notifyme
Preview
Linkstothispost
CreateaLink
NewerPost
Home
OlderPost
Subscribeto:PostComments(Atom)
Copyright@Priyanka.PictureWindowtemplate.PoweredbyBlogger.
http://www.cquestions.com/2011/09/cprogramtofindinverseofmatrix.html
4/4