write a program to print the all 4digits numbers & whose
squares must me even numbers?
Answer Posted / abdur rab
Any even number squard will yield an even value
#include <stdio.h>
int main ( int argc, char* argv [] )
{
int nloop = 0;
for ( nloop = 1000; nloop < 10000; nloop++ ) {
if ( ( nloop ) % 2 == 0 ) {
printf ("\n The Number is : %d",
nloop );
}
}
return ( 0 );
}
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
What are the advantages of using macro in c language?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What does nil mean in c?
What is the difference between malloc() and calloc() function in c language?
swap 2 numbers without using third variable?
Can you write a programmer for FACTORIAL using recursion?
Can include files be nested? How many levels deep can include files be nested?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What is header file definition?
How many levels of indirection in pointers can you have in a single declaration?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
What does %d do?
What are the standard predefined macros?
Explain bitwise shift operators?
explain what are actual arguments?