| 
1 | 
Write a program to enter the marks of 10
  students for the first assessment. The maximum marks is 100. Traverse the
  array and find print the number of students getting marks: 
a)   
  Above 90 
b)   
  Between 80 and 90 
c)   
  Between 70 and 80 
d)   
  Between 60 and 70 
e)   
  Between 50 and 60 
f)    
  Below 50 | 
| 
 2 | 
Write a program to ask the user to enter 10
  integers and store it in an array. Traverse through the array and find print
  the sum of the odd integers, and the sum of the even integers | 
| 
 3  | 
Write a program to ask the user to enter 10
  integers and store it in an array . Traverse the array and find and print the
  number of odd integers, and the number of even integers. | 
| 
 4 | 
Write a program to ask the user to enter 10
  numbers and store it in an array. Traverse the array and find and print the
  total number of positive, Zero and negative numbers. | 
| 
 5  | 
Write a program to ask the user to enter 10
  lower case characters and store it in an array. Traverse the array and find
  and print the total number of characters greater than ‘m’ and the total
  number of characters less than ‘m’. | 
| 
 6  | 
Write a program to store the string
  “Welcome to c++ programming” in an array. Traverse the array and find and
  print the total number of vowels in the string. The expected output is : The
  total number of vowels are : 7 | 
| 
 7 | 
Write a program to store the string “Object
  oriented programming” in an array. Traverse the array and print the
  characters in the even places on one line, followed by the characters in  
Even places : Ojc retdPorming 
Odd places : bet Oine rgamn | 
| 
 8 | 
Write a program to store the string “object
  oriented programming” in an array. Print the characters in the even places in
  uppercase and the characters in the odd places in lowercase. 
OJC RETDPORMIG 
betoine rgamn | 
| 
 9 | 
Economic recorder quality may be calculated
  from the equation  
Q= sqrt ( 2 * R * S / I ) 
Where R is the yearly requirement, S the
  setup cost and I the carrying cost per item. The values of R, S and for 15
  items are to be entered by the user. Write a program using for loop and
  arrays to calculate the economic recorder quantity for each of these items. | 
| 
 10 | 
Write a program to ask the user to enter 10
  numbers and store it in an array. Ask the user to enter a number which is to
  be searched in the array. Traverse the array and print the positions at which
  the number is stored in the array, if found. Else print an appropriate
  message. | 
| 
 11 | 
Write a program to ask the user to enter 10
  characters and store it in an array. Traverse the array and print the
  uppercase characters in lowercase and the lowercase characters in uppercase. | 
| 
 12  | 
Write a program to ask the user to enter10
  integers and store it in an array. Ask the user to enter a number which is to
  be searched in the array. Traverse the array and print the positions at which
  the number or its multiples are stored in the array, if found. Else print an
  appropriate message | 
| 
 13 | 
Write a program to ask the user to enter 10
  characters and store  it an array. Ask
  the user to enter a character which is to be searched in the array Traverse
  the and print the positions at which the character is stored in the array, if
  found. Else print an appropriate message | 
| 
 14 | 
Write a program to ask the user to enter a
  list of integers (maximum number of integers are 20). Traverse the array and
  find and print the number of times each integer occurs in the array | 
| 
 15 | 
Write a program to read a list of test
  scores ( maximum number of scores are 100), calculate their mean and print a
  list of scores than the mean  | 
| 
 16 | 
Write a program to read a list of alphabets
  (maximum numbers of alphabets are 30 ). For each character in the string
  entered, find the number of occurrences of it within the string and print the
  character and the number of times it occurs. | 
| 
17  | 
Write a program to read a list of mark of
  students in any one subject ( maximum number of students are 28). Find the
  highest and second highest marks for the subject. | 
| 
 18 | 
Write a program to read 10 integers entered
  by the user and store it in an array. Traverse the array and replace the 1st
  element with last element, the 2nd with the second last element
  and so on. Print the contents of the array. | 
| 
 19 | 
Write a program to ask the user to enter a
  string ( maximum length of string is 20 ). Store it in an array. Traverse the
  array and find the length of the string. | 
| 
 20  | 
Write a program to find whether a string is
  a palindrome. A palindrome reads the same whether it is read from left to
  right to right to left. | 
Saturday, 30 March 2013
Questions on C array traversing and searching
Subscribe to:
Post Comments (Atom)

 
may i know programs for all the questions ?
ReplyDeletePlease send me the link.