and why does this one prints out AB?! it should be A itself, since the character in slot 0 is A!!!
#include <stdio.h>
int main()
{
char *ch;
char vch[]={'A','B','\0','C','\0'};
...
Type: Posts; User: Ashl7
and why does this one prints out AB?! it should be A itself, since the character in slot 0 is A!!!
#include <stdio.h>
int main()
{
char *ch;
char vch[]={'A','B','\0','C','\0'};
...
Hey all
can anyone explain to me why this program output is AB?
I mean I think it should be ABC?! shouldn't it?!
#include <stdio.h>
int main()
{
char *ch;
char...
I had some question not related to programming this time
Is it necessary to take C++ before taking Java?! is it going to be hard to understand Java if I don't learn C++ in advance?! which one is...
Thank you aaaalllll... really helped me out here :)
STD, the examples were just great!
lol I read that before, but I'm still confused!!!!!!!!!!
questions pouring up...
confirm if this is true:
char f[3];
first character goes to slot 0, second goes to slot 1, third to slot 2, forth is a null character which goes to slot 3.(is it true?)...
another thing...
is there any difference between an array of characters, and string (and c-style string)?! I mean char i[10] is what we call a string, meanwhile it's an array of characters, right?!...
ok so arrays work like pointers, right?! there is no need for & in scanf?!
I guess one reason we use fgets is scanf doesn't read the words after "space"!!!!!!
tnx for the answers...have another one:
why do we have to use fgets, when using strings?!
I mean I am using scanf here and it works totally fine!!!!
#include <stdio.h>
int main()
{
char...
HUH! hard to grasp :/
Hey all, used this forum a couple weeks ago and it was great...have a couple of questions about arrays right now...
I have this code:
#include <stdio.h>
#include<stdlib.h>
int main()
{...