I have a code can printf all of the string element like  #include &lt;stdio.h&gt; int main() {     char * c[]={"I love you.","I don't."};     char **p = c;     for(int i=0;i&lt;2;i++) //I judge the number is 2 by my eyes         printf("%s\n",*p++);     return 0; }   But I don't like that part that I just can know the number is 2 by my eyes.Is there any elegant method can know how many element the array c contain?A in-built function maybe name count is ecpected in this post.Such as count(c) can give me the 2.
How do I determine the size of my array in C?   That is, the number of elements the array can hold?
What's the process to change a site logo? Who is responsible for defining a site logo? I mean, there are moderators of the site that define it, or stackexchange defines it? Explain travel times and distances on flight A flight from Los Angeles to ABQ is about 2 hours but is ~670.2 miles  A flight from San Jose to Chicago is 4 hours but is ~1859.0 miles  Can anyone explain why the travel time from San Jose to Chicago is not longer and closer to 5.75 hours?  If the distance increase by 2, shouldn't the time increase by a factor of 2 as well? How to stop a script from running if it's not root (and echo "Not running as root! Exiting...") Here's my source:  #!/bin/bash  echo "Running script to free general cached memory!" echo ""; echo "Script must be run as root!"; echo ""; echo "Clearing swap!"; swapoff -a &amp;&amp; swapon -a; echo ""; echo "Clear inodes and page file!"; echo 1 &gt; /proc/sys/vm/drop_caches; echo "";   It clears caches and stuff, and it echoes that it needs to be run as root in the terminal. I basically just want the script to cease running if it detects it's not being executed as root.   Example:  "Running script to free general cached memory!" "Warning: script must be run as root or with elevated privileges!" "Error: script not running as root or with sudo! Exiting..."   If run with elevated privileges, it just runs as normal. Any ideas? Thanks! Is "am" in "I am right" an auxiliary verb? Consider these sentences:     The ice was thick enough to walk on.      They were in a hurry.      There is enough salt in it.      It is freezing.      I am right.   Are the italicized verbs auxiliary verbs?    Update: Let me explain why I asked this question.  The above sentences are from exercise 6 "Auxiliary verbs" from the book .  From the 36 sentences in exercise 6, all except the above mentioned five sentences are indeed sentences that contain auxiliary verbs (may, must, can, will, had, etc.).   So, what happened here? Why are those five sentences in this exercise? Is it an oversight?    View image in full resolution here: Ubuntu 20.04 no sound out of Bluetooth headphones I have two cameras, a 6mpix Panasonic FZ8, and 14mpix Canon A2200.  When I compare shots from two cameras, one of differences I notice is dpi number that camera reports in JPG info:   FZ8 reports dpi=72 A2200 reports dpi=180   What physical meaning can these numbers have? I am at loss for guesses.    I am fairly familiar with notion of dpi in scanning and printing. I can calculate density of pixels on the sensor of the camera. But then, the linear density of pixels on the sensor will be hundreds times larger than number above. So what, if anything, does it mean? Finding sharing settings OWD I want to know by an example how prices in stock market changes Let us assume there is a listed company x. Currently it has 100 shares issued to trade in free float market. Current price of stock is let say 10. Now please let me know if I purchase one share of company x at the market price of 10. How it will effect the stock price. And please add and exemplify some other scenarios whichever you find good to explain more. For more information let say promoters of the company holds 100 shares with them like 50% of the company is with promoters and the other half is with people who invest or trade in that company. If I've missed to tell or assume any other vital info. needed please assume it yourself while mentioning it. Thank You Induced metric on a null hypersurface Stepping up 3V to 5V Say you take a dice and you roll it twice so that you have a pair (X,Y) where X represents the first roll, Y represents the second.   When you have a distribution like max(X,Y), what type of distribution is that? It's not uniform, obviously, because the outcomes of max(X,Y) are clearly more favorable towards the higher numbers. I'm being asked to "describe" the distribution. I know that we can look at each distinct outcome, like:  max(1,1) = 1  max(1,2) = 2  max(1,3) = 3  max(1,4) = 4  max(1,5) = 5  max(1,6) = 6  max(2,1) = 2  max(2,2) = 2  max(2,3) = 3  max(2,4) = 4  max(2,5) = 5  max(2,6) = 6  max(3,1) = 3  max(3,2) = 3  max(3,3) = 3  max(3,4) = 4  max(3,5) = 5  max(3,6) = 6  max(4,1) = 4  max(4,2) = 4  max(4,3) = 4  max(4,4) = 4  max(4,5) = 5  max(4,6) = 6  max(5,1) = 5  max(5,2) = 5  max(5,3) = 5  max(5,4) = 5  max(5,5) = 5  max(5,6) = 6  max(6,1) = 6  max(6,2) = 6  max(6,3) = 6  max(6,4) = 6  max(6,5) = 6  max(6,6) = 6  But is that the most effective way to look at a distribution like this? Is there a faster and more concise way to describe this distribution other than saying the probability of each outcome?  i.e.,  P(max = 1) = 1/36  P(max = 2) = 3/36 = 1/12  P(max = 3) = 5/36  P(max = 4) = 7/36  P(max = 5) = 9/36 = 1/4  P(max = 6) = 11/36  So, obviously, I understand how to LOOK at a discrete distribution and see what the probabilities are, but not until I look at each possible outcome. But what does it mean to "describe" a distribution? This isn't uniform or any sort of discrete distribution we're taught. Can someone provide clarity? The locus of the intersection point of two perpendicular tangents to a given ellipse Clock time is off on dual boot Compiling with g++ using multiple cores I need to convert an arbitrary amount of milliseconds into Days, Hours, Minutes Second.  For example: 10 Days, 5 hours, 13 minutes, 1 second. I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see . [Probability]need help to understand the following expression Do "twice as high xxxxx as" , "twice as high" and "twice higher" mean the same thing? Are there expected dressing norms at faculty interviews? Will a casual tee-jeans be discouraged?  In the same vein, what is expected when a student visits the campus for an interview? Where can I find 32-bit version of Ubuntu? I need to find the 32-bit version, and all I keep finding is the 64-bit. Can anyone provide me with a link?