0% found this document useful (0 votes)
34 views3 pages

C-Aptitude Test Paper

Zoho preparation material for "C" language

Uploaded by

suganya004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

C-Aptitude Test Paper

Zoho preparation material for "C" language

Uploaded by

suganya004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

2.main() 10.

{ main()
for(i=0;b=20;i<3;i++,b-2) {
printf(%d%d,i,b); printf(%d, sizeof(float)/sizeof(NULL));
getch(); }
}

3. int sum; 11.main()


main() {
{ float a=1.7;
int count=5; if(a==1.7f)
for(;sum+=count;) printf(Wipro);
printf(%d,sum,count); else
} printf(JUNO);
}
4.main() // Input: 30000 and 15000 12.main(){
{ Int x=10,y;
int a,b; y=--x--;
scanf(%d%d,&a,&b); printf(%d,x,y);}
printf(%d,a+~b+1);
}
5.main() 13.
{ Write an algorithm
int i=1,j=i; a) To check whether the given number is
for(;j;printf(%d%D,i,j)) prime no or not.
j=i++<=5; b) To reverse the given number
}

6. main() 14. write an efficient code to evaluate the


{ series given to u.
int x=3,y=x,z=y; where , x and number of terms nare given.
z=(-x)-- - --y;
printf(%d%d,x,y,z);
}
7.main(){ 15 and 16 : Correct Logical Errors ,if any.
Int i=4; 15 . (To find no. of trailing 0s in n!)
goto printf; int CountZeros(int n)
for(i=0;i<=5;i++) {
{ int temp=1 , zeros;
printf(%d,i); while(temp!=0) {
printf: printf(Im here); temp/=5;
} zeros+=temp; }
} return zeros;
}

8.main() 16 .(To find GCD of two numbers)


{ int gcd(int a,int b)
int i=10; {
switch(i) { int c;
i=20; printf(Im novice to C); while(b!=0) {
case 10: c=b%a;
printf(%d,i); a=b;
default: c=b; }
printf(bye); return a;
} }
17.Find out the aim of the snippets. 17.b)
17.a) float function(float num)
main() { {
int x=12,y=3,c=5; float start =1.0 , temp;
while(~0) do{
{ temp=start;
y=(y+c)%x; start=(start+ num /start)*0.50;
printf(%d,y,x); } while(temp!=start);
} return start;
} }

You might also like