sumesh


{ City } new delhi
< Country > india
* Profession *
User No # 72582
Total Questions Posted # 0
Total Answers Posted # 5

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 51
Users Marked my Answers as Wrong # 9
Questions / { sumesh }
Questions Answers Category Views Company eMail




Answers / { sumesh }

Question { Silicon, 22166 }

how to find the kth smallest element in the given list of
array elemnts.


Answer

#include
#include
void main()
{
int a[10],i,s,c=0; clrscr();
printf("enter the elements in the list :\n");
for(i=0;i<=9;i++)
{
scanf("%d",&a[i]);
}
s=a[0];
for(i=1;i<=9;i++)
{
if(s>a[i])
{
s=a[i];
c++;
break;
}
}
printf("small is\t %d\nfound on\t %d\n",s,c+1);
getch();
}

Is This Answer Correct ?    0 Yes 3 No

Question { IBM, 43754 }

main()

{

char *p = “ayqm”;

printf(“%c”,++*(p++));

}


Answer

the output of given problem will be :- b .
because %c in the printf function will take only one word of *p.and then its increasing one value by ++.

Is This Answer Correct ?    3 Yes 0 No


Question { 7600 }


wat is the output
int main()
{
char s1[]="Hello";
char s2[]="Hello";
if(s1==s2)
printf("Same");
else
printf("Diff");
}


















Answer

ITS A WRONG METHOD TO COMPARISON OF TWO STRINGS..SO OUTPUT WILL BE CAN NOT CONVERT int * TO char *.


THANKS...

Is This Answer Correct ?    3 Yes 1 No

Question { CMC, 6268 }

the output will be

#include
int main ()
{
int i;
i = 9/2;
printf("%i",i);
return 0;
}


Answer

the output of this program will be 4.here i is an integer type not float.

Is This Answer Correct ?    17 Yes 3 No

Question { RoboSoft, 9241 }

what will be the output for the following
main()
{
printf("hi" "hello");
}


Answer

the output of this question will be hihello (without any blank space).

Is This Answer Correct ?    28 Yes 2 No