Format string specifiers for printf
use %
to denote the start of a format specifier, not &
.
void displayPuzzle() { int i, j; char x = 'A'; for (i = 0; i < COLOUMNS; i ++) { printf("%c ", x); x++; } printf("\n\n"); for (i = 0; i < ROWS; i ++) { printf("%d\t", i); for (j = 0; j < COLOUMNS; j ++) { printf("%c ", puzzle[i][j]); } printf("\n\n"); } }
Related Posts:
- How do you allow spaces to be entered using scanf?
- How to format strings using printf() to get equal length in the output
- How to format strings using printf() to get equal length in the output
- How can you print multiple variables inside a string using printf?
- Simple way to check if a string contains another string in C?
- Is there a way to have printf() properly print out an array (of floats, say)?
- Proper way to empty a C-String
- How to write to a file using open() and printf()?
- Does C have a string type?
- Tokenizing strings in C
- What do \t and \b do?
- realloc(): invalid next size when reallocating to make space for strcat on char *
- write() to stdout and printf output not interleaved?
- Split string with multiple delimiters using strtok in C
- Pointer to a string in C?
- Convert long long to string in C?
- How do I check if a string contains a certain character?
- Convert Char to String in C
- How does strtok() split the string into tokens in C?
- How to convert an int to string in C?
- Strings and character with printf
- Printing hexadecimal characters in C
- How to remove .html from URL?
- How to convert an int to string in C?
- How I can print to stderr in C?
- How do I create an array of strings in C?
- How to check if a string is a number?
- How do I lowercase a string in C?
- How do I create an array of strings in C?
- printf with std::string?
- Return char[]/string from a function
- How to print a char array in C through printf?
- How to clear all the elements of array in C?
- How to do scanf for single char in C
- Sign extend a nine-bit number in C
- Break statement not within loop or switch in C
- How to properly malloc for array of struct in C
- How to create an array of strings in C?
- Cache Simulator in C
- expected expression before ‘{‘ token
- Setting std=c99 flag in GCC
- C Vector/ArrayList/LinkedList
- Convert char array to a int number in C
- What is the difference between %f and %lf in C?
- What is stdin in C language?
- error: ‘for’ loop initial declarations are only allowed in C99 mode [duplicate]
- c – warning: implicit declaration of function ‘printf’
- Flushing buffers in C
- error: aggregate value used where an integer was expected
- How to compile makefile using MinGW?
- Portable way to check if directory exists [Windows/Linux, C]
- Allocating string with malloc
- Incorrect checksum for freed object on malloc
- How to copy a char array in C?
- How to convert integer to char in C?
- Initializing array of structures
- Still Reachable Leak detected by Valgrind
- What is the difference between array and enum in C ?
- What is signed integer overflow?
- What does the term “empty loop” refer to exactly in C and C++?
- When to use const char * and when to use const char []
- What do numbers using 0x notation mean?
- What integer hash function are good that accepts an integer hash key?
- Can I create an Array of Char pointers in C?
- Does stack grow upward or downward?
- X86 assembly – Handling the IDIV instruction
- error C2371: ‘functionname’ redefinition: different basic types
- Pause screen at program completion in C
- note: previous implicit declaration of ‘point_forward’ was here
- What exactly is meant by “de-referencing a NULL pointer”?
- Difference between fgets and fscanf?
- Array type char[] is not assignable
- getc() vs fgetc() – What are the major differences?
- Can’t understand the working of getint() in C as per K&R
- Lua – Number to string behaviour
- printf format specifiers for uint32_t and size_t
- How to remove first character from C-string?
- Two decimal places using printf( )
- Realloc Invalid Pointer in C
- What tools are there for functional programming in C?
- typedef fixed length array
- In C, what exactly happens when you pass a NULL pointer to strcmp()?
- Reading float using scanf in c
- Example of waitpid() in use?
- Invalid write of size 1
- How to solve static declaration follows non-static declaration in GCC C code?
- Can a function return two values?
- C: warning: excess elements in array initializer; near initialization for ‘xxx’ ; expects ‘char *’, but has type ‘int’
- MIPS to C Translation
- Pointer to 2D arrays in C
- How to know what the ‘errno’ means?
- Printf was not declared in this scope
- How to free memory from char array in C
- Can I get Unix’s pthread.h to compile in Windows?
- Initializing 2D char array in C
- Process exited with return value 3221225477
- gdb: No symbol “i” in current context
- %p Format specifier in c
- “Nothing to be done for makefile” message
- What is the difference between signed and unsigned int