   Very basic question, don't kill me.
  I haven''t done much programing in C before, and I have a really basic question about inputs.  I''m wondering how to let the user enter a number, and then store it as an int.  I''m guessing that I can just use scanf, but I would have to cast it as an int.  Is that right?  Can somebody please give me an example.  Thanks. 
  I think all you have to do is:int myInt = 0;scanf("%d", myInt);;  Excellent.  Thanks. ;  int myInt;scanf("%d",&  myInt);The previous method does not work because in C, when you pass a variable as a parameter, the program actually sends a copy of the variable, not the variable itself. So it would result in the variable not changing at all. If you put a & in front of it, you are telling scanf to store the input in the address(or memory location) of the variable, thereby forcing it to change. I'm not sure, but I think this is the only way to do it so that it actually compiles.EDIT: Invalid tags   [edited by - 4 on February 18, 2004 10:05:29 PM];  Does that also work for a matrix?  For example:int x = 1;int y = 5;int someMatrix [10][20];printf("Enter a value for matrixName at position 1,5/n");scanf("%d", & matrixName [y][x]); ;  someMatrix[1][2] is a variable like any other int, so yeah.   blah blah blah. 