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 |
# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }
How to count a sum, when the numbers are read from stdin and stored into a structure?
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
how to check whether a linked list is circular.
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
write a program for area of circumference of shapes
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); }
To reverse an entire text file into another text file.... get d file names in cmd line