1. Write a 'c' program to read the age of 100 persons and count the number of persons in the age group 50 to 60.use for loop and continue statements.(10 marks)
2. Write a program to read a positive integer and print its binary equivalent.(10 marks)
3. Given two one dimensional arrays a and b which are sorted in ascending order. write a program to merge them into a single sorted array ,c that contains every item from arrays a and b, in ascending order.(10 marks)
4. Write a function in c that would traverse a linear singly linked list in reverse and write out the contents in reverse order.(10 marks)
5. Write a program to read a set of integers and to separate all odd and even numbers. write all even numbers in ascending order.(10 marks)
6. Write a program to read a real number x and find the even number nearest to x.(10 marks)
7. Write a program to multiply two matrices of order m*n and n*p respectively.(10 marks)
8. Write a program in'c' to implement k-map simplification technique.(10 marks)
Total Answers and Comments: 11
Last Update: May 07, 2008 Asked by: Arka chakraborty
JUST PUT A COUNTER TO COUNT THE MEMBERS WITH AGE BETWEEN 50 AND 60.initialise c=0.for(i=0;i<100;i++){ scanf("%d",&a[i]); if((a[i]>50)&&(a[i]<60)){ c++;}}
Above answer was rated as good by the following members: youvapankaj2004
JUST PUT A COUNTER TO COUNT THE MEMBERS WITH AGE BETWEEN 50 AND 60.initialise c 0.for(i 0;i<100;i++){ scanf( d &a[i]); if((a[i]>50)&&(a[i]<60)){ c++;}}
#include<stdio.h> main() { int age[5] i 0 count 0; for(i 0;i<5;i++) { printf( Enter the age of the d person i+1); scanf( d &age[i]); } for(i 0;i<5;i++) { if((age[i]> 50)&&(age[i]< 60)) count++; } printf( The no of the people between the age group 50 and 60 is d count); }