aboutsummaryrefslogtreecommitdiff
path: root/semestr-4/ask/lista8/str-b.c
blob: 50101cba79fe3a011db4c870aab85cba761083a2 (plain)
1
2
3
4
5
6
7
8
9
#include <stdlib.h>
#include <string.h>

char *somestr(void) {
  char *buf = malloc(sizeof("Hello, world!"));
  strcpy(buf, "Hello, world!");  
  return buf;
}