What is the problem with pointers in c?

Let’s learn what is the problem with pointers in c. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

Problem with C pointers in 2d char arrays

Why does this work: //split returns (char**) char *temp2; temp2=split(array[i],'=')[1]; and this doesn't: char **temps; temps[0]=temp2; //crashes or this: temps[0]=split(array[i],'=')[1]; //crashes

Answer:

temps is just a pointer to a char*, but it has no initalized, sensible value! temps[0] is equivalent...

Read more

vash47 at Stack Overflow Mark as irrelevant Undo

Other solutions

Having a problem with strings and pointers in C++?

if somebody can further explain an example of the following to me, to help me get a better understanding for my midterm programming file. we have to create a function that creates a strand (of characters) from a string. create a function that makes a...

Answer:

assuming to mean what I think you mean :\ #include <iostream> #include <string.h> using...

Read more

SAM JAM at Yahoo! Answers Mark as irrelevant Undo

Strange problem regarding C and pointers?

I'm trying to write an encryption program that generates a random substitution map for the letters of the alphabet.The function that generates this substitution map returns a pointer and even though i'm sure the substitution map is created succesfully...

Answer:

Although you return a pointer to the your map, your map is allocated on the stack. The memory is only...

Read more

Morbo at Yahoo! Answers Mark as irrelevant Undo

Pointers and pointers array problem?

The point is I was implementing a shell in linux (Operating Systems lab) using execvp which taker an array of character pointers as an arguement. The first arguement is the command and then input the whole array. Notice that the first element of the...

Answer:

I guess people who are used to languages where there is an explicit string type get a little confused...

Read more

Shehab at Yahoo! Answers Mark as irrelevant Undo

Got a weird problem with my pointers please everyone read question complete HELP HELP me PLEASE!!!!!! HELP?

i downloaded some cursor application which allows us to choose many pointers which comes over ur simple arrow pointers now i am not able to get rid of this drop pointer permanently what to do? i even tried by going in control panel but it gave me temp...

Answer:

Uninstall the cursor application. You'll likely find it in Control Panel | Programs and Features You...

Read more

helpme at Yahoo! Answers Mark as irrelevant Undo

Plsss help...code(c++) problem(POINTERS)?

INCLUDE<IOSTREAM.H> VOID MAIN() { INT ARRAY[]={4,6,10,12}; INT*PTR=ARRAY; FOR(INT I=1;I<=3;I++) { COUT<<*POINTER<<"#" POINTER++; } COUT<<ENDL; FOR(I=1;I<=4;I++) { (*POINTER)*=3; --POINTER; //<---...

Answer:

All are upper case. Any how you are taking PTR as the pointer to the array. void main() { int array...

Read more

kvothe at Yahoo! Answers Mark as irrelevant Undo

Answer:

i am an asian woman. i get hit on from black guys all the time. i think its more of the approach. it...

Read more

gfinder at Answerbag.com Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.