Questions tagged as 'sizeof'

2
answers

Why is the value in bytes displayed as 4?

I'm using a 2x2 array with a simple pointer and I want to display the values of it. #include <stdio.h> #include <stdlib.h> typedef struct matriz mat; struct matriz { int lin; int col; int *arr; }; mat* cria(int lin,...
asked by 05.04.2017 / 04:03
2
answers

How to get the length of a char array?

How do I get the size of a set of char ( char** )? The way I'm trying is always returning me the value 4. const char* opcSalgados[] = { "Pastel", "Mini pizza", "Coxinha", "Pao de queijo", "Pao de frango com queijo", "Pao de carne"...
asked by 14.12.2017 / 16:45