Skip to main content
original typo corrected
Source Link
pmg
  • 109.3k
  • 14
  • 132
  • 203

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h>

char std[30][40];
int x,y;

main()
{
  printf("Enter number of students: \n");

  for(x=o;x<30;x++x=0;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],);

  return 0;
}

I'm wondering: can I use pointers to access multidimensional array elements?

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h>

char std[30][40];
int x,y;

main()
{
  printf("Enter number of students: \n");

  for(x=o;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],);

  return 0;
}

I'm wondering: can I use pointers to access multidimensional array elements?

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h>

char std[30][40];
int x,y;

main()
{
  printf("Enter number of students: \n");

  for(x=0;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],);

  return 0;
}

I'm wondering: can I use pointers to access multidimensional array elements?

select code and click the 101011 button
Source Link
pmg
  • 109.3k
  • 14
  • 132
  • 203

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h>

char std[30][40];
int x,y;

main()
{
  printf("Enter number of students: \n");

  for(x=o;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],);

  return 0;
}

I'm wondering: can I use pointers to access multidimensional array elements?

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h>

char std[30][40];
int x,y;

main()
{
  printf("Enter number of students: \n");

  for(x=o;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],);

  return 0;
}

I'm wondering can I use pointers to access multidimensional array elements?

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h>

char std[30][40];
int x,y;

main()
{
  printf("Enter number of students: \n");

  for(x=o;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],);

  return 0;
}

I'm wondering: can I use pointers to access multidimensional array elements?

Corrected code format, spelling and grammar
Source Link
Adam Wright
  • 49.5k
  • 12
  • 134
  • 153

Ok am new to programming so go easy on me. i I want to make a program that allows a user to input a namesname, marital status, sex and residence of 30 students heres. Here's my code and the only problem is the program is allopwingallowing inputs above the expected 120 inoutsinputs.

#include<stdio#include <stdio.h> 

char std[30][40];
int x,y; 

main()
{
  printf("Enter number of students: \n"); 

  for(x=o;x<30;x++)
 
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],); 

  return 0;
}

And amI'm wondering can iI use pointers to access multidimensional array elements?

Ok am new to programming so go easy on me. i want to make a program that allows a user input a names marital status sex residence of 30 students heres my code and only problem is the program is allopwing inputs above the expected 120 inouts.

#include<stdio.h>
char std[30][40];
int x,y;
main()
{
printf("Enter number of students: \n");
for(x=o;x<30;x++)
 
for(y=0;y<4;y++)
scanf("%s" &std[x][y],);
return 0;
}

And am wondering can i use pointers to access multidimensional array elements

Ok am new to programming so go easy on me. I want to make a program that allows a user to input a name, marital status, sex and residence of 30 students. Here's my code and the only problem is the program is allowing inputs above the expected 120 inputs.

#include <stdio.h> 

char std[30][40];
int x,y; 

main()
{
  printf("Enter number of students: \n"); 

  for(x=o;x<30;x++)
    for(y=0;y<4;y++)
      scanf("%s" &std[x][y],); 

  return 0;
}

I'm wondering can I use pointers to access multidimensional array elements?

added 50 characters in body
Source Link
pmg
  • 109.3k
  • 14
  • 132
  • 203
Loading
Source Link
Loading