15,551 Topics

Member Avatar for
Member Avatar for ItecKid

I have this code. pthread_create does not through an error message, however it does not execute it's argument function. See comments in code for better description [code=c] void * moveFiles (void * arg); int main (int argc, char **argv) { pthread_t * tid; int rc = 0; /*variables count and …

Member Avatar for ItecKid
0
2K
Member Avatar for ItecKid

Hello, I am trying to read through a UNIX directory in C and write all the filenames to an array. However, the array is not being populated with any value. Here is a snippet of relevant code: [code=c] char **files = {NULL}; struct stat fileinfo; int count = 0; int …

Member Avatar for nezachem
0
108
Member Avatar for mi.mac.rules

I'm making a program to add/sub/mult numbers from bin/oct/dec/hex format and output in whatever base the user asks, run syntax: [CODE]./instruction <num1> <num2> <base1> <base2> <output base>[/CODE] and, besides the stupid implicit declaration warnings I get for some unknown reason (I'd love to know why), when I run this (I'm …

Member Avatar for mi.mac.rules
0
236
Member Avatar for creeps

Yes, it's yet another thread about implementing three basic operations (addition, subtraction and multiplication) on abnormally large numbers (> 100 digits). I've stored each digit inside an array of [icode]int[/icode]s, as the following piece of code illustrates [code=C] while((ch = getchar()) != EOL) a[len_a++] = ch - CHR; [/code] Now, …

Member Avatar for Shift-Stop
0
249
Member Avatar for vanan4u

question.. You are required to write a complete C program for a simple grading system. At the beginning of the system, you need to input number of students and number of subjects that have been marked. Then, you need to enter the student's identification number and marks for each subject. …

Member Avatar for vanan4u
0
151
Member Avatar for wvuengr33

The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic …

Member Avatar for wvuengr33
0
501
Member Avatar for bufospro

Hi, I am trying to read a string using the function below. The problem I have is that I can't write space in my string. So strings like : "name fullanme" are rejected and returns only "name". [CODE] char *getstring(char *ret, int max) { char *ppp, *qqq; int invalid_characters=0; //fgets(ret,max,stdin); …

Member Avatar for bufospro
0
182
Member Avatar for deepak.hm123

Somone please help me writing a code for "Reverse a word in a String" in c.. Ex: My name is XYZ o/p:XYZ is name My

Member Avatar for N1GHTS
0
209
Member Avatar for samp4ever

Hi everybody, I'm doing a simple client server communication system. The client have to send in a TCP socket a couple of strings and the server receive them, then have to search in a buffer if a category is similar to even just one of the strings sent by the …

Member Avatar for samp4ever
0
696
Member Avatar for CleanSanchez

My assignment is to make a program that can perform a card trick. You may be familiar with the concept of the trick, but here is a [URL="http://www.youtube.com/watch?v=0LrUy8W5RnQ"]video link[/URL] from my instructor. It is a fairly long program, but everything works as planned EXCEPT for my "PickUp" function, which is …

Member Avatar for CleanSanchez
0
150
Member Avatar for rocky2008

can anyone please tell me the function of calloc() and malloc() and the difference between them ... what does (char*)malloc(n) mean ??

Member Avatar for surendra verma
0
171
Member Avatar for Unidennn

Im trying to figure the way and i just cant, any help would be appriciated. [CODE] void main () void abc (int ss[][7]); { int ss [6][7]=blah blah blah blah.... abc (ss); } void abc (int ss[][7]) { for (i=blah.... for (j= blah ss[i][j]=blah... blah blah } [/CODE] error: declaration …

Member Avatar for vijaykrishnabor
0
78
Member Avatar for rollercoaster

hi Iam having trouble arranging 3 words in alphabetical order lowest to highest inputted from the keyboard.Help would be appreciated.

Member Avatar for vijaykrishnabor
0
120
Member Avatar for penny90

this is the output instruction:0 11001100 101110 after extension:0 11111100 111111101110 result:111111011110 result in decimal=-34 opcode is the arithmetic operation:1 for addition and 0 for subtraction.operand 1 and operand 2 is any 12 bits two compliment integer in binary format. 1 bit | 12bits |12 bits opcode| operand1 |operand2 hope …

Member Avatar for WaltP
-1
146
Member Avatar for shante88

[B]question:[/B]Ten arrays of string of characters representing ten surnames are to be inputed from the keyboard. the strings are of diffrent length but none is longer than 20 characters. It is required to arrange these surnames aphabetically, and to determine the length of each surname.implement in c and print out …

Member Avatar for abhimanipal
0
105
Member Avatar for Rahul.menon

[CODE] #include<stdio.h> #include<conio.h> #include<math.h> int a[70]; //src disk array int b[70];//temp disk array int c[70];//tar disk array int val, srcval=1,tempval=0,tarval=0; int es[3] = {1,1,0}; //array to decide iteration of disks from and to int et[3] = {1,0,1}; int etr[3]= {0,1,1}; int os[3] = {1,1,0}; int ot[3] = {0,1,1}; int otr[3]= …

Member Avatar for Shift-Stop
0
225
Member Avatar for digitaldan

Hello All, I've spent a ton of time on this code and am all of a sudden having a strange occurrence. While executing the case1 in my switch, it blasts through without accepting the user keyboard input and just runs the whole code. I put this section of code (the …

Member Avatar for gerard4143
0
107
Member Avatar for eviah

Hi guys, this is my first post here, and I'd love any feedback you guys can give me. I'm writing a basic program that bubble sorts its ints in an array to ascending order, then resorts some of those specific ints to the element of the position they represent. What …

Member Avatar for eviah
0
199
Member Avatar for adarshcu

can anyone prvide me certain project topics in c? i guess i noe c well.. but im findin it hard to get topics to work on ? can anyone suggest me any place for projects or topics for the same? [edit] even c++ topics would be helpful...

Member Avatar for N1GHTS
0
165
Member Avatar for myk45

Hello. i had seen in some places, the following piece of code: [CODE](void *)2[/CODE] Can anyone please tell me what exactly this means? What does casting a void pointer onto a constant as in the above case, signify? Thanks.

Member Avatar for myk45
0
95
Member Avatar for mebrahtom

I recently want to develop an English and three other languages of my country software Dictionary and I can code in C/C++.peple told me that file operation is the best topic for that.BUt I don't have any idea on how to do that. help please!!

Member Avatar for N1GHTS
0
160
Member Avatar for kangkan_14

can anyone please tell me what is wrong with dis code.....i am getting a segmentation fault even though it has been compiled successfully(in a unix system): [CODE]#include<stdio.h> int low,high,mid; void msort(int a[],int low,int high); void merge(int a[],int low,int high,int mid); int main() { int a[10]; int count; for(count=0;count<10;count++) { printf("Enter …

Member Avatar for N1GHTS
0
173
Member Avatar for penny90

[CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> int bin2dec1(char *afterx1); int bin2dec2(char *afterx2); void displayBits(unsigned value); /* function main begins program execution */ int main() { int opcode,dec1,dec2; char oprand1[13]="",oprand2[13]=""; char ones[13]="111111111111"; char zeros[13]="000000000000"; char afterx1[13]="",afterx2[13]=""; printf("Instruction : "); scanf("%d%s%s",&opcode,oprand1,oprand2); if((opcode == 1||opcode == 0) && strlen(oprand1)<=12 && strlen(oprand2)<=12) { if(strncmp(oprand1,ones,1)==0) { strncpy(afterx1,ones,12-strlen(oprand1)); } …

Member Avatar for N1GHTS
0
153
Member Avatar for mjoshi

Hello, I am having trouble with a simple math operation after reading from a file. If a particular condition is met, i am copying a number(7 positions), starting from position 31. My aim is to sum all these numbers when the condition is met. I am testing the code on …

Member Avatar for r.stiltskin
0
182
Member Avatar for USC_Megoy

Hi everyone...Can ask some help with you guyz..I want to study cursor-base but I cant find it in the internet...can anyone help me to explain what is a cursor-base implementation and what are the functions..I saw virtualheap, Mymalloc and myfree function... Thanks for the explanations...More power...

Member Avatar for Martin B
0
125
Member Avatar for GHETTO COWBOY

Hi I'm currently working on a college programming assignment and for this assignment I need to create a contact list of first name and last name and store them as the program runs I may not be able to explain this well but I understand what i have to do …

Member Avatar for csurfer
0
131
Member Avatar for manish7286
Member Avatar for abhimanipal
0
54
Member Avatar for ChainedHollow

I am needing to edit this client/server echo program into a client/server talk application, to send messages back and forth between the client and server, rather than have the client echo the message only. So the output would be: C: Hello S: Hello S: How are you? C: How are …

Member Avatar for ChainedHollow
0
162
Member Avatar for death_oclock

I'm not all that familiar with the C syntax rules, I've mostly worked with C++, and I'm having some weird problems working with Visual C 2008. Here's my code: [CODE=c]#ifndef IFF_H #define IFF_H #include <stdio.h> #include <stdlib.h> #define IDS_GROUP "" #define IDN_GROUP 1 #define IDS_CAT "cat " #define IDN_CAT 2 …

Member Avatar for HHBones
0
220
Member Avatar for Pooch74

I'm trying to learn using pointers, and in the code below I can send variables to a function. But the return is obviously wrong and I can't seem to figure it out. What I want the function to return is the number of even number occurrences. Any suggestions to where …

Member Avatar for Pooch74
0
96

The End.