ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
write a program to print the all 4digits numbers & whose 
squares must me even numbers?
 Question Submitted By :: Swetha Krishnamaneni
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a program to print the all 4digits numbers & whose squares must me even numbers?
Answer
# 1
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 ?    1 Yes 1 No
Abdur Rab
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack  5
what is the benefit of c30  1
different between overloading and overriding  3
what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); } Motorola1
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above Accenture2
Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above Accenture2
Function to find the given number is a power of 2 or not? Motorola9
write a program to display the array elements in reverse order in c language  2
#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } } ME4
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? } NDS9
Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++; ITCO3
write the program for prime numbers? TCS7
What are the preprocessors? HP3
compute the nth mumber in the fibonacci sequence? TCS6
how to do in place reversal of a linked list(singly or doubly)?  1
What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }  2
identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5; TCS4
What is function pointer and where we will use it NetApp1
x=2,y=6,z=6 x=y==z; printf(%d",x) HCL7
Can we write a program without main() function?  6
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com