what is the use of using for loop as "for(;;)"?
Answers were Sorted based on User's Feedback
Answer / piyush
for gating infinite time looping use for(;;),second approach
same as while(true).
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / arun n patil
for using first inisilization;second test counter;third
increment/decrement
int i;
syntax: for(i=0;i<=100;i++)
| Is This Answer Correct ? | 2 Yes | 2 No |
An array of size 5X5 is given to us. The elements from 1 to 25 are to be inserted in the array, such that starting from a particular position for an element i, the next element i+1can be inserted only at the mentioned positions (u,v), and if these all positions are occupied then it returns giving a count of how many positions have been occupied in the array: (u,v) = (x+/-3 , y) (u,v) = (x , y+/-3) (u,v) = (x+/-2 , y+/-2). Example: if the starting element is 1 with the given positions (1,2), then next element 2 can be placed at any one of the positions marked with *. _ _ _ _ _ 1 _ _ _ * _ _ _ _ _ _ _ * _ _ * _ _ _ _
develop a program to calculate and print body mass index for 200 employees
0 Answers Jomo Kenyatta University,
write a program to perform generic sort in arrays?
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
0 Answers Jomo Kenyatta University,
Complexity T(n) What is the time complexity T(n) of the following portions of code? For simplicity, you may assume that n is a power of 2. That is, n = 2k for some positive integer k. a) ? for (i = 1; i <= n; i++) { j = n; cout << i << ? ? j << ? ? << endl; } b) ? for (i = 0; i <= n; i += 2) { j = n; cout << i << ? ? j << ? ? << endl; } c) ? for (i = n; i >= 1; i = i/2) { j = n; cout << i << ? ? j << ? ? << endl; } d) for (i = 1; i <= n; i++) { j = n; while (j >= 0) { cout << i << ? ? j << ? ? << endl; j = j - 2; } }
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.
5 Answers ADP, Amazon, HCL, IBM, Infosys, Satyam, TCS, Vimukti Technologies,
write a program that can locate elements in array.
i don't know about working of nested for loop can any one help me
readers and writers problem
write a program that can LOCATE and INSERT elements in array using c++ programming languages.
Write a function- oriented to convert the input dollar(s) into its equivalent peso. Assume that one dollar is equivalent to 51.60
what is the difference between int &r and int& r