15,552 Topics
| |
Hi all Happy to join this forum, hope you can help me from time to time :) I'm and electrical engineer, and I use C program as part of my work, at a very basic level, just to control a piece of hardware. I now have a problem which I'm … | |
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 … | |
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 … | |
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 … | |
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, … | |
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. … | |
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 … | |
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); … | |
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 | |
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 … | |
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 … | |
can anyone please tell me the function of calloc() and malloc() and the difference between them ... what does (char*)malloc(n) mean ?? | |
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 … | |
hi Iam having trouble arranging 3 words in alphabetical order lowest to highest inputted from the keyboard.Help would be appreciated. | |
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 … | |
[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 … | |
[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]= … | |
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 … | |
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 … | |
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... | |
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. | |
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!! | |
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 … | |
[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)); } … | |
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 … | |
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... | |
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 … | |
| |
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 … | |
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 … |
The End.