In response to this question:
This works correctly for me on Ubuntu, and produces the same output each time I run it.
Compile with:
gcc c.c -lssl -lcrypto -o c
Run with:
In response to this question:
This works correctly for me on Ubuntu, and produces the same output each time I run it.
Compile with:
gcc c.c -lssl -lcrypto -o c
Run with:
hello | |
hello.ali | |
hello.o |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
if (scalar @ARGV == 0 or $ARGV[0] eq '-h' or $ARGV[0] eq '-help') { | |
die "Usage: $0 pattern [file...]\n"; | |
} | |
my $pattern = shift; |
// | |
// Code fragment based on http://stackoverflow.com/q/11515064/827263 | |
// | |
int main() | |
{ | |
cout << "Do you want to add, subtract, multiply or divide? I want to : " << endl; | |
cin >> ans; |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
const char *arg = "10.0"; | |
double d = atof(arg); | |
printf("d = %f\n", d); | |
return 0; | |
} |
int main(void) { | |
int *ptr; | |
{ | |
int obj; | |
ptr = &obj; | |
/* ptr is valid */ | |
} | |
/* ptr is now invalid */ | |
return 0; | |
} |
This small test program is linked from a comment on this question on stackoverflow.com.
The program should compile and link without error, but dies with a segmentation fault if you try to run it.
Compile with
gcc -c dlsym_test.c
If you want to try running it (it will crash):
Response to comment on this question
CPP = g++ | |
CPPFLAGS = -c -Wall -g | |
LINK = g++ | |
LDFLAGS_LINUX = -lpthread -lncurses | |
LDFLAGS = $(LDFLAGS_LINUX) | |
.SUFFIXES: | |
.SUFFIXES: .o .cpp | |
.cpp.o: |
A web page on the timewarnercable.com web site,
is displayed badly in the Chrome browser under Windows 7. See the screenshot.
It displays correctly in Internet Explorer.