Which of the following does not print the numbers from I to 10?

A) maino

int i;


while (i<=10)

printf("%d\n", i); j++;



B) main()

int i;

i=O; do

Printf("%d\n". ++i), while (i<10);

C) maino

int i; for (i=l ; i<=1 0; i++) printf("%d\n", i); I D) maino

int i;

i=O; do I printf("%d\n", ++i); while (i<=10);
69) char sl [] = 1"rhis is a string"; char s2a = "pqrs";

Identify the code snippet which returns the first location in the String sl where any character from the
String s2 occurs

Output:

Searching for one of "pqrs" in the string '7his is a string" Located in position:3 A) for (i=O s2[ij !=AO', i++) for 0 = 0; ~1 U1 1=AO, if (s2[ij = sl Uj) ( if (POS = ‑111 j < p0s)
pos = j;
B) for (i=O; s2fi] !=AO'; i++) for 0 = 0; sl Ul !=AO'; j++) if (s2[ij s 1 Uj) ( if (Pos ‑111 j < pos) POS = j;
C) for(i=Qs2[ij!='O';i++){ for 0 = 0; S' U1 !=V: j++) if (s2li] sl Uj) ( if (Pos ‑111 j < pos) pos = j;
D) for (i=O; s2fil 1= W; I++) for a = 0; slUl !=AO'; j++) if (s2[ij sl U]) ( if (pos 111 j < pos) pos = j. I



70) What could be the output of the following program? ffinclude < stdio.h > maino struct r

char city[10]; Int pin;

static struct r p =("mysore",20); static char nj] ="bangalore"; FILE *fp; fp= fopen("TRLAL",wb");

Assistance needed.

First, if you post coding question, you will need to specify the language you're using. Many modern languages use similar syntax (C++ family).

Second, Java has the same "compiler" on all platforms, while C++ has many implementation dependencies, depending on the platform and the compiler. So for C++ questions, the compiler and platform (machine type) should also be specified.

Example: (first question)

int i;
while (i<=10)
printf("%d\n", i); j++;

The value if i had not been initialized. Java and some compilers may condone this, but many C/C++ compilers do not, and give rise to run-time errors or variable results.

Finally, coding is a very precise activity. Any omission of a period (.) or a semi-colon could make a big difference, not to mention the wrong character.

The sight of code like:

"maino
int i; for (i=l ; i<=1 0; i++) printf("%d\n", i); I D) maino "

does not make it worthwhile to spend time looking at the code.

If you want your code looked at seriously, you would have to treat your code the same way.

Alternatively, you could consider posting a link to a scanned page to avoid copying code, which is an error-prone activity.

To answer the question, we need to analyze each code snippet and determine which one does not print the numbers from 1 to 10.

A) The code snippet starts with "maino", which seems to be a typo. Additionally, there is no increment of the variable i, so the loop would run indefinitely. This code snippet does not print the numbers from 1 to 10.

B) The code snippet starts with "main()", which is the correct syntax for the main function. It initializes the variable i to 0 and then uses a do-while loop to print and increment i until it reaches 10. This code snippet does print the numbers from 1 to 10.

C) The code snippet starts with "maino", which seems to be a typo. It uses a for loop to initialize the variable i to 1 and then print and increment i until it reaches 10. This code snippet does print the numbers from 1 to 10.

D) The code snippet starts with "maino", which seems to be a typo. It initializes the variable i to 0 and then uses a do-while loop to print and increment i until it reaches 10. This code snippet does print the numbers from 1 to 10.

Therefore, the code snippet that does not print the numbers from 1 to 10 is A) maino.

Regarding the second part of the question, it is not clear what the program is meant to do, as the code snippet provided is incomplete and contains errors.