C Language
(1/1)
Tanya:
C Language
1.
#define min((a),(b)) ((a)<(b))?(a):(b)
main()
{
int i=0,a[20],*ptr;
ptr=a;
while(min(ptr++,&a[9])<&a[8]) i=i+1;
printf("i=%dn",i);}
Ans:5.
2.
main()
{char a[10]={1,2,3,4,5,6};int x;
for(x=0;x<4;x++){ b[x]=x+'a';}
printf("%s",b);}
Ans:abcd56
3. Linked Lists are preffered than arrays to get advantage while
a)Insertion b)Deletion c)Accessing Element d)None
4. ~(~0<<8)? Ans:Last 8 digits are 1's rest are 0's.
5. int a,b=3,c=2;
a=b++*c;c=++b*a;Some thing like this.
print a,b,c?
Ans:6,4,24
Navigation
[0] Message Index