I'm looking for a table (or a way to generate one) for every character in each of the following C Character Sets:
Basic Character Set
Basic Execution Character Set
Basic Source Character Set
Execution Character Set
Extended Character Set
Source Character Set
C99 mentions all six of these under section 5.2.1. However, I've found it ex...
I have a small program.
#include "mpi.h"
#include <stdio.h>
int main(int argc, char *argv[])
{
int rank, size;
int buf;
int err;
MPI_Status status;
err = MPI_Init(&argc, &argv);
if(err == MPI_SUCCESS) {
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if(rank == 0) {
printf("Buffer size is less than 10\n");...
hello guys,
I am a beginner to windows device driver development. So far I read Windows Internals book. I would like to know about any good resources available online so that I can start writing kernel drivers on my own.
...
My C application relies on some files to copy over. Will the files be contained in the executable and not as stand-alone files? Would it have to be linked statically? I am using Eclipse CDT if it matters.
...
int main(int argc, char** argv) {
char *test[5][20];
char *input[20];
int i;
for(i=0;i<5;i++){
printf("enter> ");
fflush ( stdout );
fgets(input,20,stdin);
*test[i] = *input;
}
for(i=0;i<5;i++)
printf("%d | %s\n",i,test[i]);
return 0;
}
Output:
enter> pwd
enter> pathd
...
I'm looking for a sorting network implementation of a 5-element sort, but since I couldn't find a good reference on SO, I'd like to ask for sorting networks for all small values of n, at least n=3 through n=6 but higher values would be great too. A good answer should at least list them as sequences of "swap" (sort on 2 elements) operatio...
I am making a game using lite-C (exactly same syntax as C). and I cannot make this loop work.
It gives me an error at this line at compilation.
for(int i = 0; i < (cantenemigu * 3); i += 3)
I have an array with the information of where to create the enemies.
the array contains the x,y,z coordinates.
cantenemigu is the amount of enemi...
By default, gcc will add symbol table to the executable, so gdb will get a readable stack trace.
Documentation for -ggdb1 option in gcc man page says:
Level 1 produces minimal information, enough for making backtraces in parts of the program that you don't plan to debug. This includes descriptions of functions and external variables...
int handleCommand(char *command) {
pid_t pid;
pid = fork();
if (pid > 0) {
sleep(0.5);
} else if (pid == 0) {
execCommand(command);
//strcat(path[0], command);
//printf("%s", path[0]);
//execve(path[0], path, NULL);
//printf("\n");
} else {
printf("ERROR");
...
Is it possible to read a Network Adapter similar to a Serial Port? I know that Serial Ports can be read with CreateFile WINAPI Function. Is there a similar way to read raw bytes from a Network Adapter?
I am aware of the WiFi/Network Functions but the WiFi Examples are fairly sparse.
...
What are the values of
char a,b;
b="this is a character";
a=&b
What will be the value of ***a, **a, and *a? How? Are there any good examples for the above?
...
Hi,
I've been trying to figure out how the malloc_info() function located in malloc.h works. I know you have to pass it a FILE* and that no options are implemented yet, but I am at a loss as to what it is actually reporting!? Furthermore i've written a test app that allocates a whole bunch of memory and the values reported from malloc_i...
Hello,
I have a question regarding qsort.
This is a little bit weird, but my qsort function does not give me the correct output. The strange thing is that some of my compare functions are identical to my past projects but they don't give me the correct input at all. I am not sure how to test it.
For example:
int comp_name_asc(const v...
In my source code, if I write 1.23 as a literal, e.g. doThis(1.23), gcc assumes it's a double.
Rather than type doThis((float) 1.23), is there a way to use floats for decimal literals/constants unless otherwise specified in an individual source file?
Mega-bonus points, is there a way that works across (nearly) every C compiler?
...
I have a static const array class member (const pointers to SDL_Surfaces, but that's irrelevant), and have to loop through it in order to populate it. Aside from a const_cast when I'm done looping, which I hear is bad practice, how would I go about doing this?
EDIT:
The reason I don't just do...
static SDL_Surface *const myArray[3];
....
When browsing the source of a project on web I've found some weird to me return statement in main:
int main()
{
/* ... */
return 0x1;
}
So main is returning 0x1 radix 16, but that's 1 radix 10! Shouldn't main return 0?
That is incorrect, right? By the way is it Okay to return 0x0?
Thanks in advance.
...
Hi,
I am writing a C program. What I have seen from my earlier experiences is that I make some changes on a correct version of my program, and after that change, the program is computing incorrectly.
Now, for one occasion it may be easy to detect where I made that change and undo it or do it in some other way, and for other occasions I...
This function definition is found here. :
static void (*resolve_memcpy (void)) (void)
{
return my_memcpy; // we'll just always select this routine
}
I don't understand what it means. help? :D
...
I have some socket code that works on my Linux box but FAILS on my PowerPC box.
The code (when working on the Linux box) receives a data from a client and then sends the data back to the client. When tested with two netcat applications - the data is successfully wrapped around.
PROBLEM: When tested on a PowerPC (running VxWorks), the e...
hello ,
i am new to open mp and i tried an sample program from the official site
#include <omp.h>
#include <stdio.h>
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
}
and i have set the library in the eclipse as libgomp in project Properties->GCC c++ linker-...