Assignment Sample

Assignment Sample

  • Submitted By: mytaison
  • Date Submitted: 01/16/2014 11:14 AM
  • Category: Science
  • Words: 522
  • Page: 3
  • Views: 57

Assignment Part – II
1. Take an integer (DECIMAL) input and convert it to Hexadecimal number and Octal number. 2. Write a C function that searches for value key in a 2D array of size 6 by 5. The function should return the row # of location the value was found at if found and return -1 if not found.

3. Write a C function that searches for value key in a 2D array of size 6 by 5. The function should return the row # and col# of location the value was found at if found and return -1 if not found. The function returns these two values using arguments passed by reference. 4. Write a C function that has an input of a char value and returns true if the character is lower case or false otherwise.

5. Write a C function that has three inputs which are integers. The function returns true if the first number raised to the power of the second number equals the third number. 6. Write a code fragment using ONE for-loop to calculate the sum and product of the elements of a floating point array. The array is declared as shown below. Include any other declarations and initialization statements necessary to perform the operation. Display the sum and product results after the for-loop using printf. const int MAX = 15; float values[MAX] = {98.0, 75.0, 66.5, 78.5, 83.5, 89.0, 94.0, 43.0, 99.0, 88.0, 42.5, 72.0, 59.5, 77.0, 63.5}; 7. Write a recursive function to perform the following conversion: Decimal to Binary and Decimal to Octal 8. Write a program to draw the following rectangle 43211234 432 234 43 34 4 4 43 34 432 234 4 3211234 9. Write a C program to print all prime numbers between -10 and 100 and save them in a file named 3.txt.

10. Write a C program that finds the summation of all odd numbers between M and N.(Where M and N will be taken from file 5.txt) 11. Write a C program that sorts a line of text in descending order taken from file 11.txt. 12. Write a C program to create a structure for a car showroom as. Car (Brand, Model, No. of mileage, Free Servicing period,...

Similar Essays