15,552 Topics

Member Avatar for
Member Avatar for flecture

i created a header file named "pop.h" and saved in tc->include folder.......the codes included in header file is shown below [code]#include<stdio.h> #include<conio.h> int ssipower(int,int); void main() { clrscr(); printf("power=%d",ssipower(3,3)); getch(); } int ssipower(int a, int b) { int i,c=1; for(i=1;i<=b;i++) { c=a*c; return c; } [/code] when i tried to …

Member Avatar for jephthah
0
82
Member Avatar for MaestroRage

I am trying to get the main to read in a number, and use that number to do a mod calculation. However my best efforts are giving me garbage values. I am sure I am not using the pointer correctly, yet my efforts have gone unrewarded. How can I get …

Member Avatar for jephthah
0
206
Member Avatar for Y_Game

Ive been trying to create a number guessing program were the program guesses your number instead of the user guessing the programs number heres what i have so far: [code=c] #include <stdio.h> int main(void) { int guess = 50; printf("Pick an integer from 1 to 100. I will try to …

Member Avatar for Aia
0
128
Member Avatar for madankumar

Hi I need some ideas to force MQGET call fail on receiving interupt signal in AIX O/S. Thanks in Advance

Member Avatar for Ancient Dragon
0
51
Member Avatar for flipjoebanana

Hello, I am trying to figure out how to use memory blocks and create a block of data that contains different data types within it. In my particular example I want a pointer to a memory block that contains a struct followed by an array of floats. This is what …

Member Avatar for Ancient Dragon
0
88
Member Avatar for sting_010

can anyone in here help me with my programming project. Your C program must be invoked exactly as follows: shell [batchFile] The command line arguments to your shell are to be interpreted as follows. batchFile: an optional argument (often indicated by square brackets as above). If present, your shell will …

Member Avatar for Salem
0
194
Member Avatar for the reaper

After finishing my lesson on loops and array initialization i managed to sit down for a good 15 min. and right a calculator now the code is perfectly clean but when i run it i doesn't do what i programmed it to do..here is the code [code] //*********************** //* //* …

Member Avatar for WaltP
0
254
Member Avatar for mjoshi

I have a codein which i want to do the following: main(int argc, char *argv[]) { fp1=fopen(argv[1], "w") function(para1, para2, ??) } function(para1, para2, ??) { fp2= fopen(argv[2], "r") } So eesentially i want to pass a few parameters and the pointer to the function. I dont know how to …

Member Avatar for Aia
0
414
Member Avatar for soppyhankins

I am trying to create a simple C program that uses HandBrake (video converter). The only way to run this program is to have one of the (in my opinion) crappy GUIs or to type out all of the arguments in the command line. My program is simpler than the …

Member Avatar for soppyhankins
0
93
Member Avatar for jess29

I just started teaching myself c with a book called practical c programming, and i can't figure out one of the exercises. I'm supposed to write a function that scans a character array for the character - and replace it with _. I tried doing it, but i don't think …

Member Avatar for jess29
0
107
Member Avatar for coolkeg

O.k i searched the site but didn't find anything related to my problem. all ive done is made a simple calculator using the "else if" command. I'll post my coding and compiler errors below. [code] #include <stdio.h> main() { int valid =0; char operator; float number1,number2,sum; printf("calculator\n"); printf("number\t operator\t number"); …

Member Avatar for Aia
1
123
Member Avatar for prog77

I need to know can i make a for loop to place fopen function to open a set of files like i want file1.in file2.in file3.in .......filen.in so on depending on n value i give for num of files to be created ... as i want to place set of …

Member Avatar for prog77
0
176
Member Avatar for vijaysoft1

I am trying to to Develop a Dictionary in C and it is completed almost . I want to create a List box (Auto Complete) Function . I created the List box as same as the image . And loaded the array into it . Initially the list is A-Z …

Member Avatar for Prabakar
0
249
Member Avatar for madankumar

HI I would like to pass new argument to cureently running process with out interuption in unix using c code can any one Idea on this Please suggest Thanks in Advance Madan

Member Avatar for madankumar
0
77
Member Avatar for the reaper

hello all...i need help with the code below.. [code] #include <stdio.h> #include <windows.h> main() { MessageBox(0,"hello world","hello world",0); fflush(stdin); getchar(); } [/code] now i know it is perfectly clean code...but the problem is if i put 2 messagebox functions linke this [code] #include <stdio.h> #include <windows.h> main() { MessageBox(0,"hello world","hello …

Member Avatar for the reaper
0
112
Member Avatar for plike922

i am trying to write a program that finds all twin primes between 1 and 100. any suggestions? [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" int main() { int n1, n2, y, x; printf("This program list all the twin primes.\n"); for (y = 3; y <= 98; y += 2) { …

Member Avatar for jaikjoel
0
278
Member Avatar for abhisdm

I'm getting an error msg as Type mismatch in redeclaration of 'putw' for the following code... Can anyone suggest the reason for this??? [code]#include<stdio.h> union pw{ short int i; char ch[2]; }; int putw(short int num, FILE *fp); int main() { FILE *fp; fp=fopen("test.tmp","wb+"); putw(1000,fp); fclose(fp); return 0; } int …

Member Avatar for ArkM
0
151
Member Avatar for dongzhe

for my new job, i have to learn coding for the chips. i know c, but i don't have any idea about how to coding for chip. anyone can give me some hit where is good place to get start.

Member Avatar for swaira umar
0
151
Member Avatar for dummy programer

I NEED HELP WITH THIS PROBLEM!!!! ANYONE!!!! /*3. Write the function: double max_norm(double *v, int n) to compute the maximum norm of vector v[] with n elements. The max norm of a vector is computed by taking the maximum absolute value of its elements. In prob3() compute x1[]=a[][]*x0[], call max_norm() …

Member Avatar for dummy programer
0
70
Member Avatar for piods

how to cast a floating point to display an fraction form?? is there a way??

Member Avatar for ArkM
0
130
Member Avatar for makubexiii

I'm almost finished with this but got stuck in trapping it when 1)there is a winner 2) a player attempts to enter a position that has been previously filled [CODE]#include<stdio.h> #include<conio.h> display(); game(int turn, int board[3][3]); output(int board[3][3]); main() {int turn=1, board[3][3]={0}; clrscr(); display(); while(turn <= 9) {game(turn, board); turn++; …

Member Avatar for makubexiii
0
112
Member Avatar for acchao

Hey, This a bit of a lengthy problem to explain, please bear with me. My goal: Read in a data file (written in ASCII) and convert it to a smaller format (such as binary) The Problem: I start off with a proprietary format called Heim RawData. I currently don't have …

Member Avatar for Adak
0
234
Member Avatar for monjuri

hello everyone. i m monjuri. i want to find out the execution time of a C program. it works fine. but i want the time in milisecond or microsecond. Can anybody help me??? here is my code: /*insertion code*/ #include <stdio.h> #include <time.h> #define maxsize 10 int A[maxsize]; int value,j,i; …

Member Avatar for ArkM
0
150
Member Avatar for Clockowl

Hey guys, I'm parsing this WaveFront .obj file, still (for those that have read the previous post), but it has some really weird error in it that I haven't seen in a program before. The parsing algorithm starts out like this: [code]Open the file in textmode. Get filesize Allocate buffer …

Member Avatar for Prabakar
0
382
Member Avatar for pauljahill

I am trying to create a program that will count and display the number of vowels, consonants, spaces and full-stops within a 50 character limit. There is one error that the compiler keeps bringing up and when i try to fix it by changing the text it creates more errors …

Member Avatar for Major Major
0
120
Member Avatar for plike922

I cant find anything wrong with my program, any suggestions? [CODE]#include <stdio.h> #include "simpio.h" #include "strlib.h" #include "random.h" int main() { int s, r, h, w, l, t, shape; string box; string cube; string cylinder; printf("Please enter the shape; "); shape = GetLine(); switch(shape) { case 1:cube();break; case 2:box();break; case …

Member Avatar for @bhi
0
192
Member Avatar for file sharer

I am Mritunjay from India.I want to study C programming language.As I want to be a PHP developer.I have heard that one should know C before knowing PHP. How can I get daily classes for C? What is the initial step for it?I want to start with with abc of …

Member Avatar for Ancient Dragon
0
117
Member Avatar for shankhs

Hi guys! I have started learning geometry and wrote a code to calculate the distance between a line(or a segment) and a point. Here is my code: [code] #include<stdio.h> #include<math.h> #include<stdlib.h> int dot_pdt(int a[],int b[],int c[]) { int ab[2],bc[2]; ab[0]=b[0]-a[0]; ab[1]=b[1]-a[1]; bc[0]=c[0]-b[0]; bc[1]=c[1]-b[1]; // printf("%d\n",(ab[0]*bc[0]+ab[1]*bc[1])); return (ab[0]*bc[0]+ab[1]*bc[1]); } int cross_pdt(int …

Member Avatar for Prabakar
0
150
Member Avatar for aannjjaallii
Member Avatar for me_roy

my problem is quiet similar, i used atof here my data and code: "square10.dat" 0.01 1:0.1 0.04 1:0.2 0.09 1:0.3 0.16 1:0.4 0.25 1:0.5 0.36 1:0.6 0.49 1:0.7 0.64 1:0.8 0.81 1:0.9 1.00 1:1.0 THE CODE: [code=c] #include <stdio.h> int main() { char c[10]; /* declare a char array */ …

Member Avatar for Major Major
0
118

The End.