Write a program using two-dimensional array that lists the odd
numbers and even numbers separately in a 12 input values.



Write a program using two-dimensional array that lists the odd numbers and even numbers separately..

Answer / jeeva

#include<stdio.h>
#include<conio.h>
void main()
{
int a[20][20],k,n=20;
printf("enter the number of value");
scanf("%d",&n);
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}}
if(i%2==0)
{
printf("the number is even");
}
else
{
printf("the number is odd");
}}
if(j%2==0)
{
printf("the number is even");
}
else
{
printf("the number is odd");
}
k=0;
k=k+a[i][j];
printf("%d",k);
}
gerch();
}

Is This Answer Correct ?    29 Yes 43 No

Post New Answer

More C Interview Questions

Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

0 Answers  


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

0 Answers  


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

0 Answers   InterGraph,


What is the memory allocated by the following definition ? int (*x)();

2 Answers   ADITI,


Does sprintf put null character?

0 Answers  






wat s the meaning of (int *)p +4;

2 Answers  


What are the types of macro formats?

0 Answers  


What is the purpose of realloc()?

0 Answers  


Write a program to generate prime factors of a given integer?

9 Answers   Microsoft,


What is external variable in c?

0 Answers  


How a string is stored in c?

0 Answers  


There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables.

15 Answers   Cisco, Google, MBT,


Categories