15,550 Topics

Member Avatar for
Member Avatar for techyworld

Anyone can tell me how to do this question: A program that creates an array of 5 student names and an array of 5 student Ids. You can choose to input the values or directly assign them. The program should then create two threads. The first created thread executes a …

Member Avatar for techyworld
0
117
Member Avatar for linux

I have to rewrite the atoi function - that is, convert a string given by a command line argument and convert it to an integer. It works for single digit numbers, but when you give it two or more digits, it only converts the first number. I'm not sure what …

Member Avatar for linux
0
297
Member Avatar for techyworld
Member Avatar for techyworld

am having these errors: /home/Desktop/L5Q1.c: In function ‘main’: /home/Desktop/L5Q1.c:15:9: warning: incompatible implicit declaration of built-in function ‘printf’ /home/Desktop/L5Q1.c: In function ‘funct1’: /home/Desktop/L5Q1.c:26:9: warning: incompatible implicit declaration of built-in function ‘printf’ [CODE]#include <pthread.h> void * funct1(void * arg); main() { pthread_t threadid; int i,j; int x=1; pthread_create(&threadid,NULL,funct1,(void *)&x); for (j=0; j …

Member Avatar for Mouche
0
165
Member Avatar for jimbakl

hello everyone... i ve got this txt file and i want to scan it and insert the 2nd row digits at profit[ncustomer] matrix, where ncustomer is the 1st digit which readed from file. After that i want to add all the other digits in a 2 dimensional matrix dis[ncustomer][ncustomer] ... …

Member Avatar for Mouche
0
165
Member Avatar for techyworld
Member Avatar for techyworld

am having these error: /home/Desktop/L3Q3.c: In function ‘inputStudent’: /home/Desktop/L3Q3.c:23:2: warning: format ‘%d’ expects type ‘int *’, but argument 2 has type ‘int’ /home/Desktop/L3Q3.c: At top level: /home/Desktop/L3Q3.c:27:27: error: expected ‘)’ before ‘std’ Help please? [CODE]#include<stdio.h> typedef struct student { char surname[20]; char oname[20]; char address[20]; int age; }stud; void inputStudent(stud …

Member Avatar for techyworld
0
114
Member Avatar for techyworld

Can someone help me with these lines of codes?it gives me this error: /home/Desktop/L3Q2.c: In function ‘main’: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[20]’ /home/Desktop/L3Q2.c:19:2: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[20]’ /home/Desktop/L3Q2.c:22:2: warning: format ‘%s’ …

Member Avatar for techyworld
0
203
Member Avatar for techyworld

A program that accepts two positive integer values x and n, and uses a function to calculate the value of x raised to the power n. The function should calculate power by repeated multiplications. The result should be returned to the main function and displayed. I use linux terminal to …

Member Avatar for techyworld
0
170
Member Avatar for iamnot

This code is give in a data structures book I issued from my library. I am not able to understand how the functions are working. I am aware of the algorithms. Can anyone please explain how qinsert(),qremove(),build(),encode() are working.Please explain in detail [CODE]#include <stdio.h> #include <string.h> typedef struct node_t { …

Member Avatar for Mouche
0
230
Member Avatar for techyworld

Write a program containing a function that takes 2 integer parameters x and y and returns the value of x2 + y2. The main program should then allow the input of two integer values a and b and display the value of a2+b2. Can someone help me?am having this error: …

Member Avatar for techyworld
0
110
Member Avatar for swissknife007

What are the settings I require so I can debug line -by line? Or else ,I can identify lines of code where run time errors are occuring.. I want to view exact line number of error in this code/[CODE]#include<stdio.h> #include<conio.h> #include<string.h> struct node {struct node * left,*right; int freq; char …

Member Avatar for gourav1
0
296
Member Avatar for guidely

Hi, I having problem with enter file name to read file it give me result like this [CODE] Please Enter Ship File path or Ship File name: data Segmentation fault: 11 [/CODE] Here is my code [CODE] #include <stdio.h> #include <stdlib.h> struct harbour { int harbourId; int maxCap; int timeUpload; …

Member Avatar for WaltP
0
218
Member Avatar for guitarguy889

Hello Daniweb! :) I am brand new to this site, and wish I didn't need the help but I do! So let's give it a go shall we? I have a program I have been working on for about two weeks now, and I feel like it should not be …

Member Avatar for WaltP
0
189
Member Avatar for loserspearl

I have my program working and logic correct and I'm able to use another function and just fine, but my requirements are to pass the addresses of my three variable hour, min, sec, not the actual variable itself (which is declared 0 when it reaches the time() function) I've just …

Member Avatar for loserspearl
0
97
Member Avatar for cdudefire

Does anyone know any good websites that offer programming tutorials. Maybe similar to Kahn Academy, with videos and exercises.

Member Avatar for andrewll2
0
78
Member Avatar for moroccanplaya

Hi i want to know if C is the best language for image manipulation and creating a steganography tool?, if so how would i go implementing steganography and can anyone recommend any reading materials and libraries needed.

Member Avatar for Moschops
0
177
Member Avatar for iamnot

[CODE]#include<stdio.h> #include<conio.h> #include<string.h> struct node {struct node * left,*right; int freq; char c; }; typedef struct node node; int front=1; node * q[256]; char * code[128]={0},array[1024]; node * new (int freq,char c,node * a ,node * b) { node * n=(node *)malloc(sizeof(node )); if(freq) {n->c=c; n->freq=freq;} else {n->left=a;n->right=b; n->freq=a->freq+b->freq; } …

Member Avatar for gerard4143
0
188
Member Avatar for vedro-compota

hi there) guys, plesae tell me - what should i change in this code to see message in a console window (i also need define the OS) = [CODE]#include <stdio.h> #if defined(_WIN32) || defined (_WIN64) #include <windows.h> #define WINDOWSS 1; #endif int main() { char* mtext = " Please specify …

Member Avatar for vedro-compota
0
1K
Member Avatar for ath1019
Member Avatar for Ancient Dragon
0
87
Member Avatar for guidely

Hi I dont know why when I run in xcode it give me exec bad access but when I run using terminal it work fine Here is mt code [CODE] // // main.c // Harbour Unload System // // Created by Guide on 15/10/11. // Copyright 2011 __MyCompanyName__. All rights …

Member Avatar for guidely
0
167
Member Avatar for moroccanplaya

does anyone know where to start on this i want to make a command line c program which hides messages in images and audio files is there any books i can read to get this started

Member Avatar for WaltP
0
113
Member Avatar for guidely

Hi, I get a output result: Segmentation fault: 11 when I tried to do quick sort a time in ship structure Here is my code [CODE] #include <stdio.h> struct harbour { int harbourId; int maxCap; int timeUpload; double amount; }; struct ship { int number; int shipId; int sMaxCap; int …

Member Avatar for guidely
0
4K
Member Avatar for gAb1

Hi, i've a problem and hope you can help me :) I was seeing other post [url]http://www.daniweb.com/software-development/c/threads/269500[/url] but my problem is diferent... I want to copy some content of a webpage to make a db in different locales. The webpage by example is web.com/name=123, 123 is the id. The page …

0
248
Member Avatar for shweta agrawal

i have an project encrypting an grayscale image in c language. Before encrypting first i want to calculate its header that define it file format, and convert image data into a binary value. i don`t know how to do this please help me?

Member Avatar for andrewll2
0
73
Member Avatar for swissknife007

Can anyone give me starting ideas about creating B-Tree? For example,how to define a node structure in a B-tree?

Member Avatar for gerard4143
0
47
Member Avatar for ckwolfe

I am trying to read in a command-line argument like: >a.out memtest -b 4 -s 1000 And the intended result is to store "4" in the variable represented by -b and store "1000" in the variable represented by -s. I have the following code: [CODE]int main (int argc, char **argv){ …

Member Avatar for ckwolfe
0
298
Member Avatar for loserspearl

I have two programs here I cannot seem to get any return value and I have no idea why, everything I'm doing is just like my book says and I cannot get it working. The parts commented out are the other ways I was trying to make this work, somethings …

Member Avatar for loserspearl
0
107
Member Avatar for swissknife007

[CODE]#define max 50 struct code{int bits[max];int start;};typedef struct code code; struct node{int freq;int father;int isleft;};typedef struct node node; void insert(int,int); int del(int); main() { code cd,code1[max]; node node1[max*2-1]; int i,k,n,p,p1,p2,root,rootnodes; char symb,alph[max]; for(i=0;i<max;i++) alph[i]=' '; rootnodes=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s""%d",&symb,&node1[i].freq); insert(rootnodes,i); alph[i]=symb; } for(p=n;p<2*n-1;n++) { p1=del(rootnodes); p2=del(rootnodes); node1[p1].father=p; node1[p1].isleft=1; node1[p2].father=p; …

Member Avatar for vedro-compota
0
133
Member Avatar for ashishtrivedi

A console application to multiply two matrix of float numbers and print result on console. Some memory checks are done as it is allocating memory dynamicaly. May give error and exit when short of memory.

Member Avatar for aravindanne
0
219

The End.