1.OUTPUT
main()
{
int j=32242,k;
k=find(j);
}
int find(int j)
{
if(j>0)
{
j=(j%10)+find(j/10);
printf("%d",j);
}
return j;
}
A: 3 5 7 11 13
2.function add a line and return input string..
what is the problem in this prog.
char* addline(char * s)
{
char buf[1024];
int l=strlen(s);
strcpy(buff,s);
buff[l]='n';
return buff;
}
A: No issue with thr program
3q.
A[M][N] is an array rotated in anti clock wise that is A'[N][M]. then mapping A[i][j]=A'[ _ ][ _ ] in terms of M,N,i,j.
note i,j are 0 indieses
A A'
1 2 3 3 6
4 5 6 2 5
1 4
A: A[i][j]=A'[j*(n-m)] [i*(n-m)]
4Q.we have 2 sorted lists. write a function to merge 2 lists keep it result list sorted. with creating a new node.
node* merge(l1,l2)
struct node{
int a;
node * next;
}
5Q. Write the test cases for the above question
6Q. Write the test cases for the following api
bool fromfiletobuffer(file *ptr, char *buffer, wood sizeofbuf)