I meant the pointer wasn't initialzed to NULL, so i believe it should have been holding someother value if am not wrong..
Regards,
Karthik
User Profile
Collapse
-
Solved!
Sorry, I was trying to get the answer without initializing the pointer, solved now! BTW the question was what will printf print?Leave a comment:
-
Answer required!
What will be the answer for this?
...Code:#include<stdio.h> int strA = 1; int *swappy(int *ptr); void main(){ swappy(&strA); } int *swappy(int *ptr){ printf("\nThe value is: %d",*ptr); *ptr++; printf("\nThe value after post increment: %d",*ptr); ++*ptr; printf("\nThe value after pre increment: %d",*ptr); -
Threads, Need help
I 've got this script here and struggling to apply threads to the "ping" part of the program, Any help much appreciated.
...Code:use Net::Ping; use Getopt::Std; sub usage { print "pingscan -f <Input file> -o <Output file>"; exit 0; } my %options; getopts('f:o:',\%options) || die usage(); usage() if!($options{'f'}); usage() -
-
Urgent, Need Help - Redirecting O/P
foreach(@sip){
system ("nslookup $_ >> temp1");
}
The above pgm doesn't redirect the output to the temp1 file...
but when it is,
system("nslooku p google.com >> temp1"); it works
Any help appreciated.... . -
I used the http://search.cpan.org/~patl/Time-Out-0.10/Out.pod, it works well with Linux systems, but doesn't work on windows, any help appreciated,
Code:foreach $sip(@sip){ $bcd = timeout $nb_sec => sub{ chomp($sip); $packaddr = pack ("C4", split (/\./, $sip) ); $ns = gethostbyaddr($packaddr, 2); print "$sip ------- $ns\n"; } };Leave a comment:
-
gethostbyaddr
I'm writing a script that takes a list of ipaddresses as input and converts them to hostnames...... .
The problem here is some of the ip addresses do not resolve to their hostnames and for those ip addresses perl get hung and never goes to resolve the next given ipaddress....
Any suggestion is appreciated !
...Code:open (F,$filename) or die 'Cannot open file'; while(<F>){ push @sip,$_; -
Perl2Exe
Could anyone please tell me how to convert a perl script to an executable file so that it can be used on a Win32 platform...
I'm using an ubuntu machine....... Perl 5.8
I 've already used pp and perlcc but they wouldn't execute on a Win32 machine
When perl2exe was used it exited with error saying dll was not found.....
I would appreciate if anybody would brief me on what i could do on this... -
Client server program
I 've to write a client server program for my assignment at college......
The server listens at some port in one machine and the client is running on some other machine......
I 'll 've to execute a command from the client so that the command in executed on the server. Please guide me. A small hint for the start is appreciated. -
-
Portscanning
I 've written a low level port scanning in perl, but the thing is it takes a lot of bandwidth and lot of time to list me the open ports on the target machine...
I think this is because it uses a full connect scan instead of a SYN based scan.... Can a SYN request be sent to port using perl, please guide me....
Thanks -
Thanks a ton for the inputs, i need to download the whole website coz i've a project on it...Leave a comment:
-
download website pages using perl
Is there any way that i could download all the webpages in a website using perl ? -
-
Proxy settings windows
Is there a way to script a perl code to have the proxy settings change in the windows environment for IE Browser ? -
-
FTP Client
I 'm creating a FTP client and i get an error when i try this
Can't locate object method "ls" via package "ftp" (perhaps you forgot to load "f
tp"?) at ftp.pl line 239, <> line 1.
The below is the subroutine, i get input from the user and put the same to an arry and take that again for later usage,
[code=perl]
$ftp = Net::FTP->new($site, Debug... -
Squid Proxy configuration
I 've installed squid proxy server on my Ubuntu machine (Vmware image)
It has no direct internet connection and is on a private n/w (192.168).
It uses another proxy server to reach the internet. it's on another network
Now when i configure other machines to point this Ubuntu as their proxy server it wouldnot connect to the internet !
http_port 3128
acl home_net src 192.168.209.0/255.255.255.0... -
The script works fine, but when I query the server like the one below
SELECT * FROM employee WHERE username = 'admin'
I get Warning: mysql_fetch_ass oc(): supplied argument is not a valid MySQL result ***********...Leave a comment:
No activity results to display
Show More
Leave a comment: