Skip to content

Instantly share code, notes, and snippets.

@choyan
Last active December 19, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choyan/5947003 to your computer and use it in GitHub Desktop.
Save choyan/5947003 to your computer and use it in GitHub Desktop.
Wired Network Connection Necessary
Open the terminal and type in the following
ping 192.168.1.1
You should get replies not host not found or request timed out. I am assuming the 192.168.1.1 is your router's IP address.
If the above worked it means it's connected to the router. Next try ping google servers and see if you are able to
ping www.google.com
if that works you should be able to access the internet but if it doesn't there might be a problem with DNS. If so try pinging the IP address of google servers just to make sure it can be reached via IP address
ping 8.8.8.8
(this is a google DNS server IP address which doesn't change)
If that works you have your answer... DNS issue. If it doesn't work then check the resolv configuration file to see what the default nameserver is set to and change it to your router. The resolv.conf (base) can be accessed by typing
sudo nano /etc/resolvconf/resolv.conf.d/base
and change the name-server to your router's IP address as
nameserver 192.168.1.1
Now restart your computer and test again.
http://askubuntu.com/questions/252774/cant-connect-to-wired-internet
#include <stdio.h>
void main() {
int n, number, reverse,m;
printf("Enter a number \n");
scanf("%d", &number);
m = number;
reverse = 0;
while(number!= 0) {
n = number%10; //654%10 = 4;
reverse = reverse*10+n;
number = number/10;
}
if(m == reverse){
printf("its palindrome number");
}
else {
printf("its not");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment