Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.11 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4.  
  5.  
  6. void isRealtime(char *mbuf){
  7.     int *stackint;
  8.     char param[30];
  9.     int i;
  10.     stackint = (int*)mbuf;
  11.     /*Pakt eerste parameter na command*/
  12.     stackint = stackint + 1;
  13.     /*printf("%c\n", mbuf[(*stackint)++]);
  14.     printf("%c\n", mbuf[(*stackint)++]);*/
  15.     i = 0;
  16.     printf("strlen: %d\n", strlen(mbuf));
  17.     printf("strlen: %s\n", mbuf);
  18. }
  19.  
  20. void main()
  21. {  
  22.     static char mbuf[100000] ={"0123456789"};   /* buffer for stack and zeroes */
  23.     //isRealtime(&mbuf[0]);
  24.     int *stackint;
  25.     char dest[30] = {"destination1 \0 1234 \0 1345"};
  26.     char src[20] = "sourcination";
  27.     stackint = (int*)dest;
  28.     /*Gets the first parameter after the command, i.e. "ls".*/
  29.     stackint = stackint + 10;
  30.     printf("Dit is stackint zelff %d", (*stackint)+1);
  31.     printf("Dit is dest stackint: %d\n", dest[(*stackint)]);
  32.     printf("Dit is dest stackint: %d\n", dest[(*stackint)+1]);
  33.     printf("Dit is dest stackint: %d\n", dest[(*stackint)+2]);
  34.     //memmove(dest, src, 9);
  35.     //printf("Dit is de source nu : %s\nEn dit de dest: %s\n", src, dest);
  36. getchar();
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement