This is a discussion on Different Character Output within the C and C++ forums, part of the Programming Talk category; I wrote a C program as below: #include <stdio.h> main() { char test[5][10] = {"sample",&...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I wrote a C program as below:
#include <stdio.h> main() { char test[5][10] = {"sample","cow","for","is","well"}; putchar(**(sa+1)); int a=0; for(a=0; a<5; a++) { sa[a] = test[a]; } putchar(**(sa+1)); } I thought the above program would give me output as a but it gave me as c. What is the reason for getting c as output? Someone kindly brief me. |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:01 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.26) | Chet Ramey | Tech FAQ | 0 | 05-27-2004 11:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 07:00 AM |