c program to input values in a table(using 2D array) and print odd numbers from them
Answer / ashu
void main()
{
int a[10][10],i,j,n;
clrscr();
printf("enter the no. of elements:");
scanf("%d",&n);
printf("Enter the elements:");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("Odd no.:");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(a[i][j]%2==0)
{
printf(" ");
}
else
{
printf(" %d",a[i][j]);
}
}
}
getch();
}
Is This Answer Correct ? | 7 Yes | 1 No |
What happens if a header file is included twice?
What is the relation between # and include<stdio.h>
In c programming language, how many parameters can be passed to a function ?
Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work
what are the general concepts of c and c++
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist
main() { clrscr(); } clrscr();
What is the right type to use for boolean values in c? Is there a standard type?
What are bit fields? What is their use?
what do you mean by defining a variable in our c code?
main() { printf("hello%d",print("QUARK test?")); }
what is the little endian and big endian?