[ create a new paste ] login | about

Link: http://codepad.org/8oBxBbVn    [ raw code | output | fork ]

C, pasted on Apr 3:
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>
int main() {
  int i;
  char s[]={'0', '1', '2', '3'};
  for (i = 0; i < sizeof(s); i++) {
    printf("s[%d]=%d, \'%c\'\n", i, s[i], s[i]);
  }
  return 0;
}
/* end */


Output:
1
2
3
4
s[0]=48, '0'
s[1]=49, '1'
s[2]=50, '2'
s[3]=51, '3'


Create a new paste based on this one


Comments: