Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to you create and print a table in C?

I've been learning C and one of the things that I have struggled with is creating and printing tables/grids/boards. I have an idea that it will require 2d arrays, linked lists and a few functions but am unsure as to what the simplest way to do this is. From what I think I understand so far:

//your basic libraries

#include <stdio.h>

#include <stdlib.h>

#define ROWS 10

#define COLS 10

void board();

void printboard();

//

int main(int argc, char *argv[])

{

return

}

//

void board()

{

int board[ROWS][COLS]

int i, j;

for(i = 0; i < ROWS; i++)

for(j = 0; j < COLS; j++)

}

//unsure how to do this

void printboard()

{

}

That's what I understand so far. Could you correct my mistakes and explain how to do this as simply as possible. Much appreciated!

There are no answers yet.
Be the first to answer this question.