Click here to Skip to main content
14,602,044 members

C / C++ / MFC

 
GeneralRe: Does WaitForSingleObject timeout after 49 days if INFINITE is passed? Pin
PrafullaVedante8-Jun-20 0:09
MemberPrafullaVedante8-Jun-20 0:09 
GeneralRe: Does WaitForSingleObject timeout after 49 days if INFINITE is passed? Pin
CPallini8-Jun-20 1:21
mveCPallini8-Jun-20 1:21 
GeneralRe: Does WaitForSingleObject timeout after 49 days if INFINITE is passed? Pin
Joe Woodbury8-Jun-20 15:04
professionalJoe Woodbury8-Jun-20 15:04 
QuestionTranspose of a matrix Pin
Member 148492464-Jun-20 7:08
MemberMember 148492464-Jun-20 7:08 
AnswerRe: Transpose of a matrix Pin
Member 79891224-Jun-20 7:58
MemberMember 79891224-Jun-20 7:58 
AnswerRe: Transpose of a matrix Pin
CPallini4-Jun-20 20:25
mveCPallini4-Jun-20 20:25 
GeneralRe: Transpose of a matrix Pin
Member 148492464-Jun-20 23:52
MemberMember 148492464-Jun-20 23:52 
GeneralRe: Transpose of a matrix Pin
CPallini5-Jun-20 0:04
mveCPallini5-Jun-20 0:04 
Your code is wrong because you are printing the b matrix while you're updating it (you are printing 'not yet updated' items).
Try
#include <stdio.h>
  

int main()
{
  int a[3][3],b[3][3],i,j;
  for(i=0;i<3;i++)
    for(j=0;j<3;j++)
      scanf("%d",&a[i][j]);

  for(i=0;i<3;i++)
  {
    for(j=0;j<3;j++)
    {
      printf("%d ",a[i][j]);
    }
    printf("\n");
  }
  for(i=0;i<3;i++)
  {
    for(j=0;j<3;j++)
    {
      b[j][i]=a[i][j];
    }
    printf("\n");
  }
  for(i=0;i<3;i++)
  {
    for(j=0;j<3;j++)
    {
      printf("%d ",b[i][j]);
    }
    printf("\n");
  }
  return 0;
}

GeneralRe: Transpose of a matrix Pin
jeron15-Jun-20 4:53
Memberjeron15-Jun-20 4:53 
QuestionHow to draw a realtime XY plot in MFC Pin
manoharbalu1-Jun-20 22:31
Membermanoharbalu1-Jun-20 22:31 
AnswerRe: How to draw a realtime XY plot in MFC Pin
Victor Nijegorodov1-Jun-20 22:40
MemberVictor Nijegorodov1-Jun-20 22:40 
GeneralRe: How to draw a realtime XY plot in MFC Pin
Richard MacCutchan2-Jun-20 0:15
mveRichard MacCutchan2-Jun-20 0:15 
GeneralRe: How to draw a realtime XY plot in MFC Pin
Victor Nijegorodov2-Jun-20 0:24
MemberVictor Nijegorodov2-Jun-20 0:24 
AnswerMessage Closed Pin
2-Jun-20 20:41
Membermomoko222-Jun-20 20:41 
AnswerRe: How to draw a realtime XY plot in MFC Pin
CPallini5-Jun-20 0:33
mveCPallini5-Jun-20 0:33 
AnswerRe: How to draw a realtime XY plot in MFC Pin
charlieg7-Jun-20 7:29
Membercharlieg7-Jun-20 7:29 
QuestionRandom numbers Pin
CalinNegru(fearless_)1-Jun-20 21:03
MemberCalinNegru(fearless_)1-Jun-20 21:03 
AnswerRe: Random numbers Pin
_Flaviu1-Jun-20 21:26
Member_Flaviu1-Jun-20 21:26 
GeneralRe: Random numbers Pin
CalinNegru(fearless_)2-Jun-20 5:34
MemberCalinNegru(fearless_)2-Jun-20 5:34 
GeneralRe: Random numbers Pin
Joe Woodbury2-Jun-20 11:21
professionalJoe Woodbury2-Jun-20 11:21 
AnswerRe: Random numbers Pin
Richard MacCutchan1-Jun-20 22:25
mveRichard MacCutchan1-Jun-20 22:25 
GeneralRe: Random numbers Pin
CalinNegru(fearless_)2-Jun-20 4:10
MemberCalinNegru(fearless_)2-Jun-20 4:10 
GeneralRe: Random numbers Pin
Richard MacCutchan2-Jun-20 5:22
mveRichard MacCutchan2-Jun-20 5:22 
GeneralRe: Random numbers Pin
CalinNegru(fearless_)2-Jun-20 6:52
MemberCalinNegru(fearless_)2-Jun-20 6:52 
AnswerRe: Random numbers Pin
CPallini2-Jun-20 20:16
mveCPallini2-Jun-20 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.