One Word
One Word
Input: x = 10001, y = 10
Output: False
625 5 True
128 5 False
Section 2 - ZOHO 1
Section Summary
No. of Questions: 125
Duration: 100 min
Additional Instructions:
None
}
switch(i)
{
case 4 : printf("%d" , i);break;
}
} _________
}
r[0] = m ;
for( i = 1 ; i <= s ; i++)
printf("%d" , r[i]);
} _________
printf("%s" ,++*p);
printf("%s",*p++); ;
printf("%s" ,++*p);
} _________
return 0;
}
void junk(int i,int *j)
{
i=i*1;
*j=*j * i;
} _________
} _________
}
_________
}
_________
}
_________
printf("%s" ,++*p);
printf("%s",*p++); ;
printf("%s" ,++*p);
}
Output: _________
}
printf("%d " , x);
}
}
_________
}
_________
void main()
{
int k=35,z;
k=funcl(k=funcl(k=funcl(k)));
printf("k =%d\n",k);
}
_________
}
void pri(int i,int a)
{
printf("i=%d a=%f\n",i,a);
printf("a=%f i=%d\n",a,i);
}
void printit( oat a,int i)
{
printf("a=%f i=%d\n",a,i);
printf("i=%d a=%f\n",i,a);
}
_________
_________
_________
_________
int i , n;
char x[5];
strcpy( x , "Zoho");
n = strlen(x);
*x = *(x+(n-1));
printf("%s" , x);
} /
Output: _________
}
_________
r=r+1;
return (r);
}
void main()
{
oat *jam( oat *);
oat p=23.5,*q;
q=&p;
printf("q before call=%d\n",q);
q=jam(&p);
printf("q after call=%d",q);
}
_________
_________
}
_________
}
Output: _________
}
_________
for(ch=65;ch<=255;)
printf("%d %c\n",ch,ch++);
}
_________
printf("\na=%f b=%lf\n",a,b);
}
_________
_________
char *x="Alice";
int i , n = strlen(x);
*x = x[n];
for(i=0; i<=n; i++)
{
printf("%s ", x); x++;
printf("\n", x);
}
return 0;
}
Output : _________
if(y=-z)
printf("icecrearm");
else
printf("cake");
}
_________
}
void main()
{
auto int i=10;
register int j=20;
printf("main's I and j are %d %d\n",i,j);
change();
printf("main's I and j are %d %d\n",i,j);
}
_________
_________
_________
_________
_________
/
Q56. Find the output
void main()
{
double x,d=5.0;
int y;
x=d*(x=2.5/d);
printf("x=%lf\n",x);
x=d*(y=(int)2.5+1.5);
printf("x=%lf y=%d\n",x,y);
}
_________
_________
}
_________
/
Q62. Find the output
void main()
{
long num=2;
short n=2;
signed no=2;
printf("num=%ld n=%d no=%d\n",num,n,no);
}
_________
}
Output: _________
_________
int x;
int y ;
};
struct point origin , *pp;
int main()
{
pp = &origin;
printf("origin is (%d %d)\n", (*pp).x , (*pp).y);
printf("origin is (%d %d)" , pp->x , pp->y);
return 0;
}
Output : _________
_________
}
Output : _________
/
Q69. Find the output
void main()
{
auto int i=100;
printf("i=%d\n",i);
i+=1;
printf("i=%d\n",i);
}
_________
_________
}
#p2
void main()
{
auto int i;
for(i=1;i<=100;i++)
printf("%d\n",i);
}
_________
}
Output : _________
}
_________
}
_________
}
_________
}
Output : _________
}
_________
_________
_________
}
_________
_________
}
Output : _________
/
Q90. Find the outputvoid main()
{
int arr[]={0,1,2,3,4};
int i,*ptr;
for(ptr=&arr[0],i=0;i<=4;i++)
printf("%d ",ptr[i]);
}
_________
}
_________
}
Output : _________
}
_________
}
Output :
_________
int (*f)();
f= show;
printf("address= %d\n",f);
}
int show()
{
printf("Diamonds are very costly");
}
_________
}
_________
_________
_________
void main()
{
struct employee e;
e.name = "Hacker";
e.age=25;
printf("%s %d" , e.name , e.age);
}
_________
}
_________
};
void main()
{
static struct a s1={"Nagpur" , "Bombay"};
printf("%c %c\n" , s1.ch[0] , *s1.str);
printf("%s %s" , s1.ch , s1.str);
}
_________
_________
/
Q124. Find the output
void main()
{
printf("Hello\nHi\n");
printf("Hello\rHi\n");
printf("Hello\b\b\b\b\b\n");
printf("Hil\b\b\bBye\n");
}
_________
_________
_________
_________
_________
Section 3 - ZOHO
Section Summary
No. of Questions: 6
Duration: 100 min
Additional Instructions:
None
Input Format
Output Format
Constraints
1<=N<=10000000
10 344
6743 434334344333
/
A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S
itself. A string of length n has n! permutation.
Below are the permutations of string ABC.
ABC ACB BAC BCA CBA CAB
1234 1234 1243 1324 1342 1432 1423 2134 2143 2314 2341 2431 2413 3214 324
100 open = 10
close = 90
Path Notation : ‘’>” is going right, “v” going down, “<” is going left, “^” is going up.
Example Input 1 :
Start at (Row, Column): 1, 2
Path: >>> v
Output: 2 3 4 5 0
Example Input 2:
Start at (Row, Column): 2,3
Path: v > > v < < ^ > > v v
Output 8 3 4 5 0 9 8 3 4 5 0 5
Example Input 3:
Start at(row, Column): 1 , 4
Path: > v > >
Input Format
5 5 8 3 4 5 0 9 8 3 4 5 0 5
1 2 3 4 5
6 7 8 9 0
1 2 3 4 5
Time Limit: - ms Memory Limit: - kb Code Size: - kb
Examples :
Input: {tar,rat,banana,atr,nanaba}
Output: Anagrams:
rat atr tar
nanaba banana
Input Format
N - no of words
get input words into array