Saturday
May 25, 2013

Homework Help: computer

Posted by avinash on Sunday, August 28, 2011 at 6:08am.

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");

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Computer Science - //program that puts two lists in order in one single list ...
Computers - //program that puts two lists in order in one single list with all ...
C++ - 1. while(c &lt;= 5) { product *= c; c++; 2. while ( z &gt; 0 ) sum...
C programming - Enter two integers between 1 to 10 3 4 Both numbers are less ...
computer - A-Asking the user to pick a number between 1 and 20 and having the ...
Computer Science Computer Programming - Please help! I cannot figure out what I ...
C++ Programming - Can any1 please fix this c++ source problem /*Circle Are ...
c++ program - how can a modfiy this source code to a menu. #include &lt;...
computer science - The variable cp_arr has been declared as an array of 26 ...
C# - 5) Suppose you have declared an integer array named scores and you make the...

For Further Reading

Search
Members
Community