[ create a new paste ] login | about

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

slevy1ster - C, pasted on Sep 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main()
{
  char *str;
  char c = 'a';
  str = &c;
  int   len;
  len = strlen(str);

  printf("%c %d %c %d - length: %d",((unsigned char) str[0]),(unsigned char)str[0], str[1], str[1],len);
  return 0;
}


Output:
1
a 97  0 - length: 1


Create a new paste based on this one


Comments: