prasad_usc
BAN USER- 0of 0 votes
Answersvoid populate(char **s); int main() { char *s; populate(&s); printf("%s", s); // should print "Prasad" free(s); return 0; } void populate(char **str) { // 1. The next two lines is one implementation *str = (char *)malloc(sizeof(char) * 7); strcpy(*str, "Prasad"); // 2. This line seperately is another implementation *str = "Prasad"; }
What is wrong, if anything, with the two implementations of populate.
- prasad_usc in United States| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C
Facebook uses an algorithm called EdgeRank to decide which posts show up on your News Feed....
Just google 'edgerank techcrunch'. The algorithm was explained in an article on TechCrunch.
wiki rocks!!!
- prasad_usc March 05, 2012do u mean prefix tree?
- prasad_usc March 03, 2012Imagine that you are sitting in some random seat of the circular table. Now you have four other people A,B,C,D.
Any X person out of the four will be 'sitting next to you' if he sits to your immediate left or immediate right.
Now X has to choose from four seats. So X choosing an adjacent seat has a probability of 2/4 which is 0.5
- prasad_usc March 12, 2013