Hi,
Im using the code bloks and I have this code and the result is a big character and very rubbish
someone can help me
Thanks
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char buffer[8][8];
int a;
strncpy(buffer[0], " ## ", 8);
strncpy(buffer[1], " # # ", 8);
strncpy(buffer[2], "# #", 8);
strncpy(buffer[3], "# #", 8);
strncpy(buffer[4], "########", 8);
strncpy(buffer[5], "# #", 8);
strncpy(buffer[6], "# #", 8);
strncpy(buffer[7], "# #", 8);
printf("\n valor: %s",&buffer[0][0]);
printf("\n valor: %s",&buffer[1][0]);
printf("\n valor: %s",&buffer[2][0]);
printf("\n valor: %s",&buffer[3][0]);
printf("\n valor: %s",&buffer[4][0]);
printf("\n valor: %s",&buffer[5][0]);
printf("\n valor: %s",&buffer[6][0]);
printf("\n valor: %s",&buffer[7][0]);
return 0;
}
Result:
Code:
valor: ## # # # ## ########## ## ## #( (
valor: # # # ## ########## ## ## #( (
valor: # ## ########## ## ## #( (
valor: # ########## ## ## #( (
valor: ######### ## ## #( (
valor: # ## ## #( (
valor: # ## #( (
valor: # #( (
Process returned 0 (0x0) execution time : 0.013 s
Press any key to continue.