I need to allocate arrays of chars by malloc() and then print them.  #include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &lt;stdlib.h&gt;   int main (void){     int i, n, l;     char **p;     char bufor[100];     printf("Number of strings: ");     scanf("%d", &amp;n);     p=(char**)malloc(n*sizeof(char*));     getchar();     for (i=0; i&lt;n; ++i){         printf("Enter %d. string: ", i+1);         fgets(bufor, 100, stdin);         l=strlen(bufor)+1;         *p=(char*)malloc(l*sizeof(char));         strcpy(*p, bufor);     }     for (i=0; i&lt;n; ++i){         printf("%d. string is: %s", i+1, *(p+i));     }      return 0; }   I have a problem with printing those strings. I don't know how to get them.
In , someone suggested in a  that I should not cast the result of malloc. i.e., I should do this: int *sieve = malloc(sizeof(int) * length);  rather than: int *sieve = (int *) malloc(sizeof(int) * length);  Why would this be the case?
Proving that $\lim\limits_{x\to\infty}f'(x) = 0$ when $\lim\limits_{x\to\infty}f(x)$ and $\lim\limits_{x\to\infty}f'(x)$ exist What's this =! operator? How to determine which lightdm greeter is in use? This is a question of the book Linear Algebra of Kenneth Hoffman.  Describe explicitly all inner products on $\mathbb{R}$ and on $\mathbb{C}$.  I think that if $&lt;,&gt;$ is one inner product on $\mathbb{R}$ (or $\mathbb{C}$) then $&lt; ,&gt;=K[,]$, where $[,]$ is the standard inner product. Is that correct? Can't boot Windows 7 after installing Ubuntu I installed Ubuntu yesterday alongside Windows 7 and whenever I start my computer I don't have the option to boot Windows. When the computer starts it goes straight to Ubuntu without giving me an OS selection menu. When it goes to Ubuntu it gives me Ubuntu repair options and Ubuntu normal start option. I still have all of the Windows 7 files on my hard drive, but Windows 7 has no way to boot. I'm using the listings package with this \begin command:  \begin{lstlisting}[caption=blabla, label=amb]   This yields a nice code listing with a caption like "Listing 1.1 blabla". Is there a way to change the caption and have something like "Code 1.1 blabla"?  I saw the title command but it doesn't use a numbering system. Any hint will be greatly appreciated! How do you teleport a certain player to spawn after they win a 1v1 I managed a KitPvP server in Minecraft and everything works fine except when players wants to duel each other. They get sent to a room where they will be dueling. The main problem is when the winner wins, I have no idea how to teleport them back to spawn. How to compact VirtualBox's VDI file size? I've a VirtualBox VM which configured a very large hard disk size (bigger than host). By my mistake, a program on the VM generated lots of log files and the VDI file size keeps growing until there is no space on the host.   Now I've deleted the log files but the VDI file size are not getting smaller after using VBoxManage.exe modifyhd "C:\Virts\mybox-i386.vdi" compact  Is there a way to really compact the VDI file size? Thanks! Is there a formal proof for $(-1) \times (-1) = 1$? It's a fundamental formula not only in arithmetic but also in the whole of math. Is there a proof for it or is it just assumed? Splitting all lines in layer at vertices using QGIS How to organically merge nested associations? The orbit of satellites around Earth eventually decays, or so I read. This is typically caused either by atmospheric drag, or by tides. I would assume most satellites have a limited service life in orbit. Hence the question - What is the typical orbital life of a satellite? How long before it's successor must be launched into orbit ?  EDIT: For instance, a weather satellite How "submitted", "to appear", "accepted" papers are evaluated in a CV? Assume a search committee is reading my CV and in the publication section they notice some of my papers are only submitted or claimed to appear in a journal (or accepted for publication in a journal). Sometimes the journal which has accepted the paper for publication lists the title of accepted articles before actually publishing them, but in the rest of cases there is no evidence to prove that the referee process of the paper is over and the journal has accepted the paper for publication. Also assume preprints of my papers are available in ArXiv. So, my questions are:   How a search committee interprets and evaluates those papers which are just submitted or are claimed to appear?  Does a search committee consider these types of publications less valuable than the published ones (assuming the same quality)?  Does a search committee refer to my preprints in ArXiv to evaluate my submitted or accepted papers? What is the meaning of the density of a distribution at a point? I know how to use PDFs to calculate probabilities, but I don't think I understand them. For example, at $X=0$ the PDF of the standard normal distribution is $\approx 0.4$. Does this have any useful meaning? Problem recreating BCD on Windows 7 64bit - The requested system device cannot be found Changing wp login url without .htaccess How to change wordpress login url without using .htaccess, should be a manual process, so example.com/login will not redirect to example.com/wp-login.php so example.com/login will be the login page? I am able to evaluate the limit $$\lim_{x \to 1} \frac{x + x^2 + \dots + x^n - n}{x - 1} = \frac{n(n + 1)}{2}$$ for a given $n$ using l'Hôspital's (Bernoulli's) rule.  The problem is I don't quite like the solution, as it depends on such a heavy weaponry. A limit this simple, should easily be evaluable using some clever idea. Here is a list of what I tried:   Substitute $y = x - 1$. This leads nowhere, I think. Find the Taylor polynomial. Makes no sense, it is a polynomial. Divide by major term. Dividing by $x$ got me nowhere. Find the value $f(x)$ at $x = 1$ directly. I cannot as the function is not defined at $x = 1$. Simplify the expression. I do not see how I could. Using l'Hôspital's (Bernoulli's) rule. Works, but I do not quite like it.   If somebody sees a simple way, please do let me know.    Added later: The approach proposed by Sami Ben Romdhane is universal as asmeurer pointed out. Examples of another limits that can be easily solved this way:   $\lim_{x \to 0} \frac{\sqrt[m]{1 + ax} - \sqrt[n]{1 + bx}}{x}$ where $m, n \in \mathbb{N}$ and $a, b \in \mathbb{R}$ are given, or $\lim_{x \to 0} \frac{\arctan(1 + x) - \arctan(1 - x)}{x}$.   It sems that all limits in the form $\lim_{x \to a} \frac{f(x)}{x - a}$ where $a \in \mathbb{R}$, $f(a) = 0$ and for which $\exists f'(a)$, can be evaluated this way, which is as fast as finding $f'$ and calculating $f'(a)$.  This adds a very useful tool into my calculus toolbox: Some limits can be evaluated easily using derivatives if one looks for $f(a) = 0$, without the l'Hôspital's rule. I have not seen this in widespread use; I propose we call this Sami's rule :). Adding Items to the List Using JQuery Mobile in Javascript Calculating $\lim_{x\to0} \left\lfloor\frac{x^2}{\sin x \tan x}\right\rfloor$ Find $$\lim_{x\to0}  \left\lfloor\frac{x^2}{\sin x \tan x}\right\rfloor$$ where $\lfloor\cdot\rfloor$ is greatest integer function   I am a high school teacher. One of my students came up to ask this limit.  For $\lfloor\frac{\sin x}{x}\rfloor$, I have used $\sin x &gt; x$ using increasing decreasing functions.  I tried to prove $x^2 &gt; \sin x \tan x$ using increasing /decreasing  function but I am not getting it. replacing the default console emulator under Windows XP How can I replace the default program providing console windows under Windows XP?  I know of , and I have a shortcut to start cmd.exe in . But now I want console applications to start in Console2 rather than the default console program, even when I have no control over the program that starts the console application. (I.e. a non-console program starts consoleapp.exe, and I can't change it to start Console2 instead, but I still want the application to be started inside a new instance of Console2.)  (Note that I want to replace the console itself, that is, the window in which console (i.e. text mode) applications run. And I must be able to run arbitrary, unmodified console applications: a substitute for a specific console program such as Cmd won't do me any good.)  EDIT: So what I'm after is a , which           OT: I want to know when Microsoft is going to make a decent CSRSS replacement. Not being able to adjust the width of a "terminal" by resizing the window is a complete joke.         Go download the ISE already. (It's included in Win7/2008R2.)   But as far as I understand this ISE is an , not a general console emulator.