15,550 Topics

Member Avatar for
Member Avatar for mitzoff

I am new to programming in C and I'm trying to write a random number generator with a Gaussian distribution with user-defined mean and variance. I've looked at the code given in "Numerical Recipes in C" but I don't understand it very well. If anyone could point me in the …

Member Avatar for iamthwee
0
155
Member Avatar for zite.1

can someone tell me how to find dummy tutorials on how to compile and run C programs using a text editor and the Command Line Window.

Member Avatar for Narue
0
110
Member Avatar for bhmails

Hi all, I'm new at c. How do I make the system pause until any key is pressed in linux like getche does in borland? thanks

Member Avatar for TkTkorrovi
0
290
Member Avatar for calipxo

1.Show that X^62 can be computed with only 8 multiplications. 2.Programs A and B are analyzed and found to have worst-case running times no greater than 150NlgN and N^2, respectively. Answer the following questions, if possible: 1. Which program has the better guarantee on the running time, for large values …

Member Avatar for TkTkorrovi
0
110
Member Avatar for anzdyy

Write a complete C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. The program should display the following menu to the user for them to select one of the five options listed. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX …

Member Avatar for Salem
0
108
Member Avatar for joebenjamin

Here is my issue if anyone can help. I am trying to write a program that will generate 100 random numbers between 1 and 50. With these numbers, I want to generate a list that will tell the number of random numbers that fell between 1-5, 6-10, 11-15, 16-20, ... …

Member Avatar for Ancient Dragon
0
100
Member Avatar for shoby

[code=c] void transpose_matrices(int a[][2],int result[][2]) { int i,j,temp; for (i = 0; i < 2; i++) { for (j = i+1; j < 2; j++) { temp = a[i][j]; a[i][j] = a[j][i]; a[j][i] = temp; } } } [/code] it would be very helpful if someone guide with this transpose …

Member Avatar for Aia
0
193
Member Avatar for theraven1982

Hello, I've just started learning C, and now I have a problem (and I couldn't find a solution on the interweb ;) ). I want to multiply two matrices (2x2). First it 'reads' two matrices, and after that it needs to multiply it. It reads the matrices using double for-loops; …

Member Avatar for theraven1982
1
14K
Member Avatar for vidaj

Hello. I'm having a hard time figuring this out. I want to open a file, but I don't know the filename. I know the directory the file resides in, and I know the extension ('.lay'), and I know there is only one file with that extension in the directory. How …

Member Avatar for iamthwee
0
100
Member Avatar for corolaron

A palindrome is a word that reads the same both forwards and backwards. Examples: anna, nitalarbralatin, amanaplanacanalpanama. Write a function that takes a string as parameter and returns true if the word is a palindrome, false otherwise. Also write a program palindrome.cc that reads words from the terminal and checks …

Member Avatar for gkmishr1
0
2K
Member Avatar for manjuannthomas
Member Avatar for TkTkorrovi
0
77
Member Avatar for koolbabu

Hi, I am a Programmer.Can any please explain about equate function in C. Thanks Koolbabu

Member Avatar for Ancient Dragon
0
66
Member Avatar for anzdyy

Write a complete C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. The program should display the following menu to the user for them to select one of the five options listed. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX …

Member Avatar for Salem
0
103
Member Avatar for ithilgore

In this guide, I am analyzing the process of making from scratch a fully functional SYN port scanner. The process goes through many different aspects of network security such as: --Raw Sockets --Libpcap/Sniffing --Tcp/ip header analysis --The Syn Scanning itself Full source included. I am waiting for feedback. [url]http://rapidshare.com/files/53266260/Coding-a-Syn-Scanner-eng-v1.1.txt.html[/url] -ithilgore

Member Avatar for Hamrick
0
181
Member Avatar for sInFuL69er

Hi, This is a segmant of my code that iam working on, for some reason its not giving out the expected output :( which is 11010111. It gives me "elements: ☺ ☺ ☺ ☺ ☺ ☺" and its really bugging me cuz it looks right. Any help would be appriciated. …

Member Avatar for TkTkorrovi
0
70
Member Avatar for asilter

i have a .so(shared object) file and i want to debug into it. could you plz give a little gdb debugger code sample which is adding a shared object for debugging. PS : My executable is Test.x and I know to start with [code] gdb Test.x [/code] :) could u …

Member Avatar for TkTkorrovi
0
76
Member Avatar for asilter

how do i send a multidimensional char array to a function. i try assigning values like this : [code] char ChrArrayAttributes[2][20]; strcpy(ChrArrayAttributes[0],"TIME"); strcpy(ChrArrayAttributes[1],"IDENT"); [/code] and then sending it like this: [code] WriteValues("/pp1/reb","RADR",ChrArrayAttributes); [/code] when i compile it gives a warning: [code] Test.c:115: warning: passing arg 3 of `WriteValues' from incompatible …

Member Avatar for Salem
0
81
Member Avatar for gaurav252

[code] #include <stdio.h> int main() { int i=43; printf("%d\n",printf("%d",printf("%d",i))); return 0; } [/code]

Member Avatar for Ancient Dragon
0
104
Member Avatar for luitelm

Dear all, How can i read a excel file as input, then select only some wanted coulums and rows for this file and again save it as excel file. Hope to let help from you all. Sincerely, Monoj Sharma Luitel BHUTAN

Member Avatar for VatooVatoo
0
96
Member Avatar for gaurav252

[CODE=C]#include <stdio.h> int main() { float f=0.0f; int i; for(i=0;i<10;i++) f = f + 0.1f; if(f == 1.0f) printf("f is 1.0 \n"); else printf("f is NOT 1.0\n"); return 0; }[/CODE]

Member Avatar for vidaj
0
103
Member Avatar for asilter

how to tell more than one include folders to the compiler Makefile : [code] CC = gcc CFLAGS = -I../include HVFUTILCFLAGS = -I/home/empress/HamVeriFeeder/hvfutil/include/ all: HVFE.o RdbMapping.o BUFR_Encoder.o clean: rm -f BUFR_Encoder.o HVFE.o RdbMapping.o ../lib/libhvfe.a *.bufr *.dat BUFRENCODER_CFLAGS = $(CFLAGS) $(HVFUTILCFLAGS) BUFR_Encoder: BUFR_Encoder.o $(CC) -g -c BUFR_Encoder.c $(BUFRENCODER_CFLAGS) HVFE: HVFE.o $(CC) …

Member Avatar for asilter
0
199
Member Avatar for asilter

[code] CC = gcc CFLAGS = -I ../include/ LD = gcc EmpCC = empcc HVFUTILLDFLAGS = -L/home/empress/HamVeriFeeder/hvfutil/lib -lhvfutil all: BUFR_Decoder.o HVFD.o BUFR_Printer.o clean: rm -f BUFR_Decoder.o HVFD.o BUFR_Printer.o ../lib/libhvfd.a ../bin/BUFR_Printer BUFR_Decoder: BUFR_Decoder.o $(CC) -g -c BUFR_Decoder.c $(CFLAGS) HVFD: HVFD.o $(CC) -g -c HVFD.c $(CFLAGS) BUFR_Printer: BUFR_Printer.o ../bin/BUFR_Printer $(CC) -g -c …

Member Avatar for Salem
0
94
Member Avatar for TkTkorrovi

I created this thread to have a common place to discuss these issues. GTK is a cross-platform non-commercial graphical user interface for C, now there are these snippets here using GTK [url]http://www.daniweb.com/code/snippet744.html[/url] and [url]http://www.daniweb.com/code/snippet737.html[/url] but i hope that there would be more :) Maybe the best howto is this [url]http://www.ibiblio.org/apollo/WinGtkHowto.html[/url] …

Member Avatar for TkTkorrovi
0
3K
Member Avatar for sayeo87

Hi, how do I print a string such that only a section of it gets printed, without printing it character by character? I thought of pointer arithmetic, but that will only change the starting point of the string for you. What I want to do is to print from start …

Member Avatar for sayeo87
0
274
Member Avatar for asilter

could u plz give 4 little files-sample (c and c++ code and header files) which shows how to call c++ class public member function. thanx.

Member Avatar for Salem
0
126
Member Avatar for amishosh

Hi! I compile this simple "Hello world" Win32 program: [code] [COLOR=green]#include[/COLOR][COLOR=green]<windows.h>[/COLOR] [COLOR=green]int[/COLOR][COLOR=green] WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, [/COLOR] LPSTR lpCmdLine, [COLOR=green]int[/COLOR] nCmdShow) { MessageBox(NULL, [COLOR=green]"Hello World!"[/COLOR], [COLOR=green]"Note"[/COLOR], MB_OK); [COLOR=green]return[/COLOR] 0; } [/code] When the program runs I get weird fonts. See attachement. Kindly advise. Thanks

Member Avatar for Ancient Dragon
0
73
Member Avatar for bops

Hey, I want to write a function with the following signature - BOOL checkPassword( char * input ); In this function I want to be able to check this password against the stored windows password in the SAM database. I'm completely new to this idea, so I would like to …

Member Avatar for Ancient Dragon
0
104
Member Avatar for bops

[code=c] BOOL setContent( LPSTR szContent ) { HANDLE hFile; BOOL bSuccess = FALSE; DWORD dwTextLength; hFile = CreateFile( "data.txt" , GENERIC_WRITE , 0 , NULL , CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL ); if( hFile != INVALID_HANDLE_VALUE ) { DWORD dwWritten; dwTextLength = strlen( szPassword ); if( WriteFile( hFile , szPassword …

Member Avatar for Tight_Coder_Ex
0
259
Member Avatar for amishosh

Hi! I learnt the C language (NOT C++) but the concept of threading is completely new to me. I'm having trouble finding a good tutorial or book on the subject. Can some one point me to a tutorial or book about threading specifically using C? I use Visual C++ 2005 …

Member Avatar for Ancient Dragon
0
242
Member Avatar for asilter

Variables in the data structure changes when they were sent to CreateRawDataBUFR at runtime. With gdb debugger, just one line before CreateRawDataBUFR, I print the value of rdi.sIdentName, rdi.sRawDataFilePath and rdi.sRawDataFileName to the screen, they are "IST" and "data/" "IST050906125859.RAWADM9" accordingly. They are true. But after i send the address …

Member Avatar for asilter
0
162

The End.