Regarding interfacing DUE with DUE

I try to interface due with due using wire library,but it does show any output will you please make sort out of this problem
Master program:
#include <Wire.h>

void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}

byte x = 0;

void loop()
{
Wire.beginTransmission(4); // transmit to device #4
Wire.write("x is "); // sends five bytes
Wire.write(x); // sends one byte
Wire.endTransmission(); // stop transmitting

x++;
delay(500);
}
Slave Program:
#include <Wire.h>

void setup()
{
Wire.begin(4); // join i2c bus with address #4
Wire.onReceive(receiveEvent); // register event
Serial.begin(9600); // start serial for output
}

void loop()
{
delay(100);
}

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany)
{
while(1 < Wire.available()) // loop through all but the last
{
char c = Wire.read(); // receive byte as a character
Serial.print(c); // print the character
}
int x = Wire.read(); // receive byte as an integer
Serial.println(x); // print the integer
}

How is it wired?
Have you connected the ground between the two Dues?

i connect scl and sda pin of due 1 to due 2 and common ground provided but it doesn't transmit any information ,will u please help sort out this

Just have the master Due going and look at the I2C signals being generated on your scope.

Then connect them together and look again at the signals.

Do you see some?

Have you seen this thread:-
http://forum.arduino.cc/index.php?topic=146802.15
Reply #22 shows some working code for two Dues.

Also look at reply #33 for some updates to the code.

Check what value pullup resistor you have, if they are only 1K then connecting two Dues together is asking them to sink 6.6mA and that is just over the recommended limit.

thanks a lot sir I connected DUE with DUE through SCL (21) and SDA(20) now it's working ,but still SCL1 and SDA1 not working whether there is any issue ?

but still SCL1 and SDA1 not working whether there is any issue ?

The issue is that these are not I2C lines at all!
They are SPI interface lines, no wonder they will not work.