18,490 Topics

Member Avatar for
Member Avatar for soosai

hi there .. whats wrong with th e following code? [code=c] #include<mpi.h> #include<stdio.h> #include<math.h> void main(int argc, char **argv) { int rank, row, i, j,s,p ; int n; int oldrow,oldcol,newrow,newcol; MPI_Status status; int z; int delta_x,delta_y; int temp_map[60][40]; int map[60][40]; int col; z=oldrow,oldcol,newrow,newcol; temp_map=0; map=0; printf("pls enter the row value\n"); …

Member Avatar for Salem
0
183
Member Avatar for Drake

When using functions in C, i cannot seem to make my table of options apprear on screen. I have put it in but it will not appear. The options i have put in work fine, for example press 1 to calculate voltage. This works fine and the answer is given …

Member Avatar for Narue
0
159
Member Avatar for wsn

Hi, I'm trying to make a makefile but after i enter the command make makefile it says nothing to be made in the makefile, can someone please help me? Nd.c depends on Pd.h Pd.c depends on Pd.h Md.c depends on md.h md.h depends on Rd.h # Makefile CC = gcc …

Member Avatar for wsn
0
145
Member Avatar for dipps

hi, could some one help me to make a calculator connected to a DSP? This is for my real time systems project. the software used to complile is Code Composer Studio. DSP used in TI TMS320C6711. keypad is 4x4 Matrix X,Y type. I could not understand how to make the …

Member Avatar for dipps
0
156
Member Avatar for programmer321

[code] Hello, In one of my C codes, I have written a function for logging into a files. When the size of the file exceeds 10 MB, I close that file and open a new file. But at run time my Code is crashing at times during file closing. This …

Member Avatar for programmer321
0
2K
Member Avatar for sonia sardana

Private Sub Command3_Click() Dim a, b As Integer Dim divide As Double a = 10 b = 3 divide = div(a, b) MsgBox (divide) End Sub Private Function div(a, b) div = a / b End Function Function return type by default is integer in C. & if we do …

Member Avatar for choudhuryshouvi
0
107
Member Avatar for cd0712

I have a project. please help me...... Write a program in C that do the following. 1. Accepts 1 parameter. The parameter is the filename to be processed. If there are no parameters, or if there are more than 1 parameters, show an error message. 2. Opens the file and …

Member Avatar for jephthah
0
153
Member Avatar for wollacott

g.c:12: warning: passing argument 1 of 'fgets' from incompatible pointer type g.c:12: error: too few arguments to function 'fgets' g.c:14: error: 'sc' undeclared (first use in this function) g.c:14: error: (Each undeclared identifier is reported only once g.c:14: error: for each function it appears in.) [CODE] #include <stdio.h> #include <string.h> …

Member Avatar for jephthah
0
313
Member Avatar for knight fyre

I'm trying to create a function that will sort the contents of a file in alphabetical order. The problem I'm having is that the code doesn't seem to do anything. The only examples I could find have to do with arrays which I am not using but I tried to …

Member Avatar for knight fyre
0
1K
Member Avatar for El Duke

Hello there, Just wanted to say hi, and it is a nice place to get some new ideas and hints. I am a PHD student in my last year (hopefully), and I work on some simulator that uses C & C++ to build its process models and functions. Thanks again …

Member Avatar for nav33n
0
39
Member Avatar for rockmania

I need C code or program to save the output of the following program into a jpg file(any picture file)? i need to save the output of this program in to a picture file..i need to take printouts of those output..help me with the code that does the above thing... …

Member Avatar for Salem
0
164
Member Avatar for wollacott

need help with my program. it keeps repeating (NULL) instead of preinting hello backwards. if remove ca[5] i get bus error. any help please on how to fix it. [CODE] #include <stdio.h> int main() { char ca[10]; ca[0] = 'H'; ca[1] = 'e'; ca[2] = 'l'; ca[3] = 'l'; ca[4] …

Member Avatar for Luckychap
0
101
Member Avatar for electromania

Im codding a programm that has multiple functions. Once functions calculates the means of 2 sets of data and prints meanx and meany. Now another function will use those means to do some other calculation. I dont know how to get those values from one function and pass them into …

Member Avatar for Ancient Dragon
0
307
Member Avatar for allopiloping

dear sir.... i have a problem.... i have a c source code and i want to make it in vb.net source with window form please if anyone can help me...... i will be thankful. best regards, the source : [url]http://www.sharekingdom.com/download/998/fork_source.pdf[/url]

Member Avatar for allopiloping
0
106
Member Avatar for ketan.kaloni

im doin project in 89s51 microcontroller.....i hav its assembly code ready with me but now i want to convert it to C language but im unable to do so...its very important nd urgent to me.....plzz ca anyone help me out with this......

Member Avatar for Colin Mac
0
44
Member Avatar for wollacott

[code=c] #include <stdio.h> #include<string.h> main() { FILE * myfileptr; // a pointer declared to the file stream. char sc; // a character which will be input from the file. // main code... myfileptr=fopen("words","r"); //open the file hopefully while((sc=getc(myfileptr))!=EOF) //get a char { if(sc)printf("%c",sc); //dump it to screen } printf("EOF\n"); } …

Member Avatar for Aia
0
335
Member Avatar for wollacott

does anyone know how to give the characters of a string numeric variables? so when i can print the numeric variables in decending order so the word is read backwards? for example hello h=1 e=2 l=3 l=4 0=5 olleh your help would be very appreciated, a snippet would be awesome, …

Member Avatar for Aia
0
144
Member Avatar for knight fyre

I've created a program that writes info to a specific file and reading from it to generate an income report. The problem I'm having is that when I geerate my report, the last person that was entered is repeated twice, hence throwing off the grand total. Here's the bit of …

Member Avatar for knight fyre
0
129
Member Avatar for meliss1485

I need to write a C program that uses random number generation to create sentances. I need to use strcat to form the sentance and it should generate 20 sentances. What i have so far is below. however it is not working. I know that the problem is something with …

Member Avatar for meliss1485
0
95
Member Avatar for rockmania

I am using TURBO C++ IDE 3.0..i am able to execute the program that are related to graphics. but the problem i face is when i get the output i am not able to capture the output using print screen key.the output is a black DOS screen and is not …

Member Avatar for Salem
0
106
Member Avatar for cd0712

I have a project. please help me...... Write a program in C that do the following. 1. Accepts 1 parameter. The parameter is the filename to be processed. If there are no parameters, or if there are more than 1 parameters, show an error message. 2. Opens the file and …

0
52
Member Avatar for wollacott

can anyone help me make my program work. after it capitalize i want it to reverse the new string. something like palindrome. [CODE] #include<stdio.h> #include<ctype.h> #include<string.h> /*program begins here*/ int main() { /**/ char string[100]; char *ptr = string; /*shws the user what to do*/ printf("Enter string and use a …

Member Avatar for jephthah
0
168
Member Avatar for ninjajake

I am using dr. scheme and I need to retrieve the 2nd item in a list. is there a function like car that returns the second one instead of the first one?

Member Avatar for azimuth0
0
126
Member Avatar for kpnprakash

hello, i am developing a c coding for comparing two txt files(one key file with the transcripted or duplicete file) to figure out the wrong text in the transcripted file.Can anyone help me that how to develop the codes.

Member Avatar for Ancient Dragon
0
171
Member Avatar for bswapnil

[code=c] #include <stdio.h> void stripnl(char *str) { while(strlen(str) && ( (str[strlen(str) - 1] == 13) || ( str[strlen(str) - 1] == 10 ))) { str[strlen(str) - 1] = 0; } } int main() { FILE *infile; char fname[40]; char line[100]; int lcount=1,i=0; char mean[100]; /* Read in the filename */ …

Member Avatar for Ancient Dragon
0
140
Member Avatar for programmer321

[code] Hello, I need my C code Exe to exit only using Cntrol + C and the cross should be disabled. Can anyone help me with this. Regards. [/code]

Member Avatar for programmer321
0
180
Member Avatar for Majestics
Member Avatar for jephthah
0
127
Member Avatar for rohit83.ken

I have a C file of the following .When I execute this in Fedora 7 version 2.6.21-1.3194.fc7 and arch =i686 I get following errors [root@kwi-11156f06184 Desktop]# cc test.c test.c:3:20: error: libipq.h: No such file or directory test.c: In function ā€˜main’: test.c:12: error: ā€˜PF_INET’ undeclared (first use in this function) test.c:12: …

Member Avatar for jephthah
0
594
Member Avatar for fluidDelusions

Hello! I'm having a very difficult time with this problem. What I'm trying to do is generate a sine wave for a specific frequency and output it as raw pcm data to a file. The sine wave is generated as follows: [code] samples[i]=static_cast<int>(32767 * amplitude * sin(static_cast<double>(i)*scale) ); [/code] where …

Member Avatar for ims
0
2K
Member Avatar for Indianblues

Hi all, In C, is it possible to write a program that will read the data from database(like oracle) and inserting the data to database and some doing manipulations on the data. If yes,pls provide me information to write the program and some sample code.I am posting the same question …

Member Avatar for jephthah
0
100
Member Avatar for iiz

this is the python code [CODE]os.popen("explorer.exe " + os.getcwd())[/CODE] would jsut need a conversion to c or c++

Member Avatar for iiz
0
118
Member Avatar for erezlevi

hi, my name is erezlevi, and I want to know how can I create object and find examples about it. I need a way to register my script to windows so when using this: i=create (erez.levi) with i .Initialize (0) .Senddata ("12345") .Terminate () how can I write an Python …

Member Avatar for sneekula
0
108
Member Avatar for wsn

Hi, I'm practicing for my test and I'm really confused on this question This is the content of make file assuming that part1 and part3 has been modified. list the sequence of command activation in the correct order for make to run I understand it looks at the target then …

Member Avatar for Salem
0
121
Member Avatar for dv1r

how do i use a .txt file in C like read and save form and into it... any help will be good thenks :)

Member Avatar for dv1r
0
150
Member Avatar for wsn

Hi, I'm trying to get two small programs that use macro to work but neither of them is doing so the first macro selects the least significant bit from an unsigned char [code] #include <stdio.h> #define LBIT(X) (((X)&1)?1:0) int main() { unsigned char a; printf("Enter a character:\n"); scanf("&c",a); printf("Least signficant …

Member Avatar for wsn
0
124
Member Avatar for srinivasysr2003

Hi, I am new to Python script programming and I have Python script also. I have below method which was written in C (Framemaker Development Kit). F_ApiSave(VarBookId, VarOutputFLBPDFFileAbsPath, params, *returnparams) "params" and "returnparams" arguments are of Object "F_PropValsT" and want to use above method from Python to send the values. …

0
61
Member Avatar for lemichelle

I'm trying to get a program to print out two strings that I input. I can't figure out why its not working! [code] #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE 30 int main() { char s1[ARRAY_SIZE]; char s2 [ARRAY_SIZE]; printf("Enter a String:\n"); scanf("%25s\n", s1); printf("Enter string 2:\n"); scanf("%25s\n", s2); printf("String 1: …

Member Avatar for Aia
0
101
Member Avatar for wsn

What does the following code do when the input is 56789 1234 45a72 int i; float f; char name[50]; scanf("%2 %f %*d %2s",&i,&f1,&name); When I ran the code in the compiler and used printf to check the results i got 56 789.000000 45a72 I understand that it didn't 1234 because …

Member Avatar for wsn
0
119
Member Avatar for awoc

[code] /* while readAccuracy returns a 1 { call readLimits call printInputs call printArea } */ while (readAccuracy == 1) { calcArea (readLimits, printInputs, printArea); } [/code]

Member Avatar for awoc
0
96
Member Avatar for lemichelle

Hi everyone, I just started C and I'm trying to understand some conceptual things. If anyone can help me with any of my questions It would be appreciated! I just want to hear it from something other than a book. 1. So, if macros can hold arguments, why would you …

Member Avatar for Aia
0
98
Member Avatar for ramiljoaquin

Hi everyone! What is the code if I want to connect to MS ACCESS or SQL SERVER using C++? Is there a special compiler for c++ for that database code? Thanks

Member Avatar for ramiljoaquin
0
118
Member Avatar for DoctorBob

Hello, I'm learning to Program in C and I have to create a math quiz. The user is supposed to enter the amount of questions they want to answer. I'm trying to get a Random number generator to produce two random numbers and then a random sign (+ - * …

Member Avatar for WaltP
0
124
Member Avatar for Member #304223

Hi ! I am new to C. I am developing C for an Assembly and C combined code for a project. I need to display simple messages to the Hyper terminal using C. To be specific, (See attached snippet of code which I am trying to run on Keil toolset) …

Member Avatar for Narue
0
264
Member Avatar for alsoumhi

Hi gys how are you, I really need your help to understand the idea for putting some parameters with main function, it is like this ( int main ( int a , int b , char* c) ) what is this and when we use it and how!!! ... I …

Member Avatar for Narue
0
314
Member Avatar for Little E

Can anyone help me write a program that will print a sentence using 5 different words that are in 6 different array's based on a random number generated by the computer. Right now my code will print 5 sentences using each elimate from each array, but it doesn't pick the …

Member Avatar for CPLUSCPLUS
0
555
Member Avatar for tvisha

Hi All, I am Tavisha, a student trying to work on a C code related to image processing. I am a newbee to C and Matlab and would need lotsof help from all you guys in successfully running my code and gettin my results. I hope to enlarge my own …

Member Avatar for Serunson
0
89
Member Avatar for betaven75

Hi guys, This is my very first thread. Now I would like to know about file handling. I have got this book, but the concept is still not that clear to me. So, can you guys suggest any online material that would help me in this regard. Also, could you …

Member Avatar for Narue
0
102
Member Avatar for soosai

hi there ..... would like to know how would be the coding for password generation of different sets of characters... thanks u

Member Avatar for echocoder
0
115
Member Avatar for Ints

I have a c program that I need to use in dos 5 but i havenĀ“t found a way to do so .Programs that work perfectly in Win XP console window, will not work in dos.Does anyone know : What do i have to add to my code so it …

Member Avatar for jephthah
0
160
Member Avatar for electromania

Hi, Im reading a file, with 2 columns. this is working such as [code] 1999 5848946 2000 5458445 2001 5757585 2002 7699865 2003 7459758 2004 5797054 [/code] as Im reading I want to be able to count how many rows I've read and also add the all values as im …

Member Avatar for electromania
0
124

The End.