1

//codigo valido arriba...

double & Getsomenumber()
{
    double number = 12.4;
    double &anotherNumber = number;
    return anotherNumber;
}

//codigo valido abajo...

2

#include <iostream>
using namespace std;

int main()
{
    cout << "Hola << endl;  
    return 0;
}

3

#include <iostream>
using namespace std;

int foo(int x) {
    return x*2;
}

int main()
{
    x = foo(2);
    cout << x << endl;
}

4

#include <iostream>

int main()
{
    int cout = 0;
    return cout;
}

5

#include <iostream>
#include "miobjeto.h"
#include <stdlib.h>     /* srand, rand */
#include <time.h>       /* time */

using namespace std;

int foo() {
    int iSecret, iGuess;
    /* initialize random seed: */
    srand (time(NULL));
    
    /* generate secret number between 1 and 10: */
    iSecret = rand() % 10 + 1;
    return iSecret;
}

int main()
{
    while(0 != foo())
    {
        miobjeto * o = new miobjeto();
        miobjeto->doSomething();
    }
    return 666;
}

6

#include <iostream>
#include <miobjeto>

using namespace std;

int main()
{
    miobjeto * o = new miobjeto();
    miobjeto->doSomething();
    return 666;
}

7

#include <iostream>
#cosa

using namespace std;

int main()
{
    return 666;
}

8

#include <iostream>
using namespace std;

int main()
{
    int x = 'A';
    int w = 345;
    float y = "Hola";
    return 666;
}

9

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int x;
		System.out.print(x);
	}
}

10

#include <iostream>
using namespace std;

int main() {
	cout << "L.P. Rocks!";
	return 0;
}

//Un virus elimina los archivos del path_gcc/include/bin, 
//entre estos esta uno nombrado iostream

L.P. Ejemplos

By Mijail Paz

L.P. Ejemplos

  • 800