Category : Files from Magazines
Archive   : CUJ9309.ZIP
Filename : 1109113A

 
Output of file : 1109113A contained in archive : CUJ9309.ZIP
/* array5.c: Arrays as parameters */
#include

void f(int b[], size_t n)
{
int i;

puts("\n*** Entering function f() ***");
printf("b == %p\n",b);
printf("sizeof(b) == %d\n",sizeof(b));
for (i = 0; i < n; ++i)
printf("%d ",b[i]);
b[2] = 99;
puts("\n*** Leaving function f() ***\n");
}

main()
{
int i;
int a[] = {0,1,2,3,4};
size_t n = sizeof a / sizeof a[0];

printf("a == %p\n",a);
printf("sizeof(a) == %d\n",sizeof(a));
f(a,n);
for (i = 0; i < n; ++i)
printf("%d ",a[i]);
return 0;
}

/* Output
a == FFEC
sizeof(a) == 10

*** Entering function f() ***
b == FFEC
sizeof(b) == 2
0 1 2 3 4
*** Leaving function f() ***

0 1 99 3 4
*/



  3 Responses to “Category : Files from Magazines
Archive   : CUJ9309.ZIP
Filename : 1109113A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/