how to swap 3 nos without using temporary variable
Answers were Sorted based on User's Feedback
Answer / vivek
<?php
$a=10;
$b=20;
$c=30;
list($b,$c,$a) = array($a,$b,$c);
echo $a;
echo $b;
echo $c;
$a = $a ^ $b;
$b = $a ^ $b;
$a = $a ^ $b;
echo $a . $b;
?>
Is This Answer Correct ? | 3 Yes | 2 No |
main() { char a[4]="HELLO"; printf("%s",a); }
how to delete an element in an array
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4
18 Answers HCL, IBM, Infosys, LG Soft, Satyam,
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.
21 Answers ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,