Advertisement
Guest User

Untitled

a guest
May 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char **argv)
  5. {
  6.     void *matrix[5][5];
  7.    
  8.     matrix[0][0] = (void*) "uma string na coluna zero";
  9.    
  10.     float *f = (float*) malloc(sizeof(float));
  11.     *f = 15.0;
  12.    
  13.     matrix[0][1] = (void*) f;
  14.    
  15.     printf("%s\n%f\n", (char*) matrix[0][0], *(float*) matrix[0][1]);
  16.    
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement