Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
printing address of the integer
Name: sarahq Date: June 16, 2006 at 21:08:13 Pacific OS: winxp CPU/Ram: 513 Product: dell
Comment:
i am trying to read a file and putting it into an arry. For some reason, when i am trying to print by array its not printing the integer but bunch of wried numbers. I know its printing the address of the integer but not the integer, but i do not remember how to fix it here is my code FileInputStream inData; DataInputStream read; int store[] = new int[5];
try { BufferedInputStream (new FileInputStream ("inData.txt")); inData = new FileInputStream("inData.txt"); read = new DataInputStream(inData);
for(int i=0; i < 5;i++){ store[i] = read.readInt(); }
Summary: Hi I am Sohail, Writing u first time. Please ckeck my problem given below. In an array, if we print the name of an array that shows the address of first element. because array name is a pointer & po...
Summary: An array is nothing more than a block of memory. This block of memory has a length of 5 (that's your subscript) times the sizeof(int) (which is 4). So, int a[5] is just a block of memory that is 20 ...
Summary: I am trying to print a set which is in an arrary in C: I have: for loop printf("{"); printf("%d,", &A[i]); printf("}"); ,but I got the output set like this: {1, 2, 3, 4, } how can I get red of the la...