Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Thursday, September 27, 2012

RECURSION determine if two arrays are identic


#include <stdio.h>
int kontrollo(int a[], int b[], int n)
{
if(n==1)
{
    if(a[0]=b[0])
    return 1;
    else return 0;
}
else    if(a[n-1]==b[n-1])
    return (kontrollo(a, b, n-1));
else
    return 0;

}
int main()
{
    int a[10]={2, 25, 75};
    int  b[10]={2, 25, 75};
    int u=3;
    int x;
    x=(kontrollo(a, b, u));
    printf("%d", x);



    return 0;

}

Friday, September 21, 2012

c program to get ip address of a computer


#include<stdlib.h>

main()
{
   system("C:\\Windows\\System32\\ipconfig");
   system("pause");

   return 0;
}