This question is about programming in C. you please help me with a question that is.

This question is about programming in c. can you please help me with an issue that is -

Why do we write - printf ("r = c = %d %d sum = %d\n", sum c, r,);

What we're trying to accomplish here by writing this.

I also wanted to know why we write things within double quotes.

The book programming in C I have, gave no information on this subject.

The way if statements can be nested, of same whiles and fors can

also be nested. To understand the nested loops how to work, watch the

program below:

/ * Demonstration of nested loops * /.

(main)

{

int sum c, r,

for (r = 1; r<= 3="" ;="" r++="" )="" outer="" loop="">

{

for (c = 1; c<= 2="" ;="" c++="" )="" inner="" loop="">

{

sum = r + c;

printf ("r = c = %d %d sum = %d\n", sum c, r,);

}

}

}

When you run this program, you will get the following result:

r = 1 c = 1 sum = 2

r = 1 c = 2 sum = 3

r = 2 c = 1 sum = 3

r = 2 c = 2 sum = 4

r = 3 c = 1 sum = 4

r = 3 c = 2 sum = 5

In short, in C, a string enclosed in double quotation marks is replaced by a pointer to character to this string somewhere in memory.  The first parameter of a call to printf() is a pointer to the format string and the following parameters replace the % {(quoi que) the characters that appear in the format string.}  %d represents a whole argument of printing.

HTH,

JW

Tags: Windows

Similar Questions

Maybe you are looking for

  • Error 1068: Unknown connection status: the service dependency or groups could start

    Hi all I ave a problem with Vista service pack 2 running on Sony viao with the network. I have access to the internet, but my connection icon has a red X on it with the message "unknown connection status: the dependency service or group could not sta

  • Foglight v7 trial install?

    HI -. Where can I find instructions for installation step by step (or video) v7 Foglight installation? In addition, is VMware v 5.5 supported? Type r Björn.

  • HDMI adapter

    Should which adapter I plug my HP P7-1534, which has no HDMI port on my Vizio HD TV? Thank you

  • How to create the cover of the app for my application

    Dear, Please help me with step by step tutorial how to create an appcover for my application! I'm kinda noob on C++ and I read the paper, but could not apply! (didn't know where to put the code - C++ part) not Qml I want to put a picture of the asset

  • Official name of CTS-PHD1080P4XS1 softwareID20010

    Hi all We present to our customer, a "CSCua44699" Bug ID report regarding. In this document, you must write the official name of the worm 'CTS-PHD1080P4XS1' ID20010 software such as "S01718 - 4.0FINAL [ID:40063] 2010-10-20". "." But we can find it no