473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

C Program - Gets/Prints IP Address

Hello guys,

Is there a way/code to get my computer's IP address and prints it without using ipconfig


Example:
My computer's IP address is: 198.110.69, it will print an output: 198.110.69 or 19811069 (without dots wiould be better though)

Thanks in Advance,
Regards,
AnimeProgrammer *brofist
Feb 16 '14 #1
2 2100
weaknessforcats
9,208 Expert Mod 8TB
http://www.beej.us/guide/bgnet/outpu...ml#getaddrinfo

This blog has good info for C coding.
Feb 16 '14 #2
thanks i'll look at it.
Feb 17 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Prashanth Badabagni | last post by:
Hi , I'm Prashanth Badabagni .. I have and idea how a program prints it's own source code .. void main() { FILE *P; char *file,c; strcpy(file,__FILE__); p=fopen(file,"r");
9
by: gg | last post by:
If somebody asks me to write a program that prints itself ( quine ) can I write the following program as an answer - #include <iostream> #include <fstream> using namespace std; int main (...
1
by: Unebrion | last post by:
Alright im working on a program that prints out user imput in a frame, along with a barcode.. it is like the front of an envelope. Here is the description for the program. This...
2
by: Frank | last post by:
My program gets a WM_QUERYENDSESSION message and asks the user if it is OK to shutdown. While he's thinking about it, Windows displays a box saying the program is not responding. If the user...
5
by: khajeddin | last post by:
hi :i have to write a program which should print its "source code" for output.how to do this.please make me a example of "source code" and make a definition of "source code".program shouldn't contain...
1
Blackout
by: Blackout | last post by:
Hi, I'm new to c and need to write a program that prints the numerical value of eof but the problem is I don't even know what the numerical value of eof is or how im supposed to find it!!! I've...
2
by: destination | last post by:
I want to know how a C program gets executed. I mean what happens when we compile. What steps compiler follow for successful execution of a program? What happens at compile time and run time?...
4
by: miroku800 | last post by:
the resulting printout looks like this 1,blue,12345678,54 2,red,00001234,6 3,blue,12345678,63 4,blue,12345678,65 5,red,00001234,17 Is there any way to format it into columns and then print it...
1
by: sandeep kaur | last post by:
how the program gets executed by the c++ compiler? i mean what steps are follwed by the compiler to execute the program.whic statement is executed first and so on? and suggest me some sites related...
3
by: supraja P | last post by:
I need to write program to print the frequency of words in that file. for example i ahve text file with the following string: "Given a text file name as command line argument, write a program that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.