10 More Discussions You Might Find Interesting
Hello, I am trying to reverse complement one string and reverse another (NO complement!), both with pointer. My code compiled without error, but did not do the job I wanted.
// STEP 1: declare the type of file... (5 Replies)
Discussion started by: yifangt
I'm newbie learner. My all friend use windows just only me use linux.
so i can't solve any problem by myself. i need a solution.
how can i use pointer as a string.
This code work on... (6 Replies)
Discussion started by: raihan004
Does anyone know?
int x = 1;
int *p = &++x; //ok !
int *q = &x++; //gives an error :O
why the first pointer is ok but the second is an error? (13 Replies)
Discussion started by: nishrestha
my question is not about How code can be rewritten, i just wanna know even though i am not using read only memory of C (i have declared str) why this function gives me segfault :wall:and the other code executes comfortably though both code uses same pointer arithmetic.
... (4 Replies)
Discussion started by: zius_oram
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
i am having a string like
" X1 " ---> string lenght is 30
I have stored this to a chararry . ref
so here ref = " X1 "
now i trim the left space by my function . Si the string now becomes
"X1 " ---> string lenght is 15... (3 Replies)
Discussion started by: arunkumar_mca
could any one tell why the following is showing segmentation fault while using **ptr
but working fine using **a
... (1 Reply)
Discussion started by: useless79
i've written a simple c program:
... (4 Replies)
Discussion started by: mridula
i have a function:
char *pcCityIdToCountryName(ADMIN_DB_DATA *pstHEader, unit uiCityID)
this returns a pointer to CountryName if cityId is given.
to retrieve countryname i give:
CountryName = pcCityIdToCountryName(..................);
but when i compile it is giving :... (5 Replies)
Discussion started by: jazz
I have a problem reading characters from keyboard with the scanf function.
Here there is a little piece of code:
/* The last 3 libraries are included because in the real program I use some... (4 Replies)
Discussion started by: robotronic