HOW TO CONNECT PUTTY TO VMWARE

1. Go to Virtual Network Editor

2.click on “NAT” . In the above screen shot “NAT” is available Vmnet8.

3.clik on the “NAT settings”.

4.note down “GATE WAY” ip address . for example see the above screen. 


5.close.

6.click on "DHCP settings".

7. note down “start ip add”, “end ip add”.

8.close.

9.note down “subnet mask”.

10.go to “VM WARE”.

11.edit below file.

“vim /etc/sysconfig/network-scripts/ifcfg-eth0

12.while edit the above file you are in root mode.

13. chek that fields like below.oherwise change your fields like a below. 


BOOTPROTO=static

ONBOOT =yes
 GATEWAY = 192.168.204.2 (“enter your note down gateway address” )
 IPADDR = 192.168.204.8 
SUBNETMASK =192.168.204.0 

14. save.

15.restart.

16.login putty.

17. enter ip address.

18.select “ssh” mode.

19.ok

0 comments:

#include<stdio.h>
main()
{
        int a[5] = {55,11,66,77,72};
        int max,min,i;
        int smax,smin;
        max = min = a[0];
        smax = smin = a[0];
        for(i=0;i<=4;i++)
        {
                if(a[i]>max)
                {
                        smax = max;
                        max = a[i];
                }
                if(max>a[i]&&smax<a[i])
                {
                        smax = a[i];
                }
        }
        printf("the first max element z %d\n",max);
        printf("the second max element z %d\n",smax);
}

0 comments: