19,876 Topics

Member Avatar for
Member Avatar for PBIRBAS

Hi to all, Could someone show me by giving a code about how to create dynamic an Array in C, (nxm) from strings and read values in this array ? Thanks in advance...

Member Avatar for William Hemsworth
-1
88
Member Avatar for PBIRBAS

The following problem has to do with Arrays. I would appreciate if someone could give an explanation in this assumption below: If we assume that SIZE is a catholic constant with value 100 and A is Array of size SIZE with n stored elements from left to right. If it …

Member Avatar for kolosick.m188
0
85
Member Avatar for group256

Hey everyone, For my project, I need to write an assembly/C code to detect multiprocessors. I really have no idea how as I have barely done assembly coding and I have no good reference or even idea how to start. Again, what I am going to do is, I'm trying …

0
95
Member Avatar for Grn Xtrm

Hello friends, I am having a problem writing a function to search for a string in an input file. I have successfully output the file with line numbers, which was the first step in the program, but now I am stuck on searching for a given string. After searching for …

Member Avatar for Tajon Wong
0
3K
Member Avatar for msbhatt_2000

I want to solution for following question b'case i am begineer 1 Following is the menu to be displayed to the user. On selecting a choice display appropriate result. Number should be accepted from the user. Menu 1. Prime Factors 2. Leap Year 3. Sum of all digits 4. Number …

Member Avatar for ankush.sheetal
-1
184
Member Avatar for glennpatton

Hi, I am having problems with a device bulit by a colleague that needs to be working for Tuesday. If you talk to this device in HyperTerminal it errors all the time as it get the data from the UART too quickly it , he has found a thing call …

Member Avatar for glennpatton
0
191
Member Avatar for hangman1060

The programming assignment is to read a text file, extract the words from it, and save them in a 2D array that contains the word and the number of occurrences of that word. For example, if a text file contains the words "first" "second" "third" "second", the array should contain …

Member Avatar for imolorhe
0
128
Member Avatar for kochan
Member Avatar for jbennet
0
48
Member Avatar for EastJohn

This is basically my code. It says build succeed, but I get nothing. What am I doing wrong. The user inputs a sentence, for example, Hello. (I've taken out other parts such as return LOWERCASE, return DIGIT, and what would happen in those cases for ease of reading). The program …

Member Avatar for Skeen
0
143
Member Avatar for Soileau

I am trying to implement my own atoi function, and I am supposed to pass my variables in after ./a.out. Here is my code: #include <stdio.h> #include <stdlib.h> int myatoi(char array[]) { int sum = 0; int i = 0; while(array[i] != '\0') { int number = array[i] - '0'; …

Member Avatar for lipun4u
-1
225
Member Avatar for Bheeman89

Hello guys....I just have some doubt about C programming...well I have done a lot of functions for airline booking system but im not able to implement the multi dimensional array... I dont get how should I implement it in this problem as the variables are global and they are used …

Member Avatar for Bheeman89
0
2K
Member Avatar for panagos

How to produce an assembly file (.asm) on Windows by having a program in C? I use NetBeans 6.7.1 on Windows and it would help me a lot if i could do that, additionaly do you know a way that the syntax produced will be compatible with MASM? I have …

Member Avatar for panagos
0
89
Member Avatar for mitsuevo

hey, i'm mostly used to coding in Java but recently been having to do some C coding for some uni work and need some help every now and again... and found this forum in a number of google searches, so i bet its good :) so decided to join this …

Member Avatar for peter_budo
0
94
Member Avatar for ab00120

Hi there, I am currently attempting to enhance an old program to use Windows Forms in C++. From what Ive read it would be preferable to use Visual Basic or C#; however in its current state, combined with my lack of experience in C#/VB this would be a real struggle …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for fatihpiristine

what's wrong here? [code=c] typedef struct person { int age; char name[50]; }; int main() { struct person test; test.age = 20; test.name = "Test"; return 0; } [/code]

Member Avatar for fatihpiristine
0
99
Member Avatar for GadiK

Hi everyone. I'm diving head first into the fascinating world of Linux network programming. I've read about using sockets to do the networking, however, all the books I've seen so far have talked about IP addresses. My goal is to connect my PC to a development board and make them …

0
108
Member Avatar for thebluestar

This is the problem: In this exercise you have to write a program to manage items in a super market. Suppose that the data about each item includes: • Item’s ID: ID of the item, it is an integer which ranges from 1 to 9999 • Item’s type: Its value …

Member Avatar for Narue
0
205
Member Avatar for miskeen

Hello guys, How can I make a switch case using an array of chars. Ex: [CODE]char input[50]; // my code here switch ( input ) { case "abc": // do something break; case "xyz": // do otherthings break; }[/CODE] Is that possible in C? Thank you!

Member Avatar for miskeen
0
130
Member Avatar for soultrav

Hi! I wrote a program that reads and saves e-mails, of course by using sockets for connecting to the mail server. But I don't know how to download attachments, I used telnet to open an e-mail with an attachment, and I didn't see a link or something to the attached …

Member Avatar for marco93
0
135
Member Avatar for dylank

Hi, there are several threads on this issue, but none seem to give me a good answer. My current code is this (This program plots points on a graph) : [CODE] //Put line equasion into arrays. #include <iostream> using namespace std; double getData(int counter, double m, double b) { int …

Member Avatar for invisal
0
1K
Member Avatar for jodie121997

Hi All, I have the application which will be support 32 bits and 64 bits and below are the statement to handle 32bits/64bits data and new_node->data is void * new_node->data for ( index = 0 ; index < items ;index++ ) { if (data_size == SIZE_32 ) { * ( …

Member Avatar for Aia
0
112
Member Avatar for teddyg18

So i am writing a simple prgm in which you enter the values of 2 matrices and multiplies them. [code] #include<iostream> #include<iomanip> #include<cmath> using namespace std; int main() { int i, j , k , l, m , n , o, p; cout<<"Enter The Rows And Cloumns And Of The …

Member Avatar for asxoliastos
0
126
Member Avatar for didi00

Hello I'm doing a program about UART in Borland C. And I have a few questions. This is the code: [code] #include <iostream.h> #include <dos.h> #include <conio.h> #include <stdio.h> #define COM1 0x3F8 int main(void) { clrscr(); // outportb( COM1 + 1, 0 ); outportb( COM1 + 3, 0x83); outportb( COM1, …

Member Avatar for didi00
0
104
Member Avatar for ankur_

How to support Pthread calls like(pthread_create) in Vxworks 5.5 We have include the macro INCLUDE_POSIX_PTHREAD but we are getting linker error while loading. We tried to build the bsp(In tornado 2.2) with the pthread after changing the config file but we were not able to build the bsp

-2
90
Member Avatar for Iam3R

Hello , i have written the code for finding the middle element of the list with 0(n) complexity. please gurus, verify that and let me know if it needs any modifications and ofcourse i have question to ask when the no of elements are odd we can easily find the …

Member Avatar for Iam3R
0
130
Member Avatar for chornox

Hello, I need a pointer on how exactly I can use part of the terminal for inpit and another part for output. Example [code]Enter the next command> [my command] <other thread display some stuff>[/code] Because I have a thread to display and a thread to read and I don't want …

Member Avatar for dkalita
0
97
Member Avatar for kat_stephens

I'm currently working with a group of my classmates on a recipe measurement converter, and I'm currently on the most difficult code of the three that is my part of the project. The code is basically for getting the amount from the user, a fraction. I have based my algorithm …

Member Avatar for mrnutty
0
73
Member Avatar for jeeter19

I need to print out the following values on std-out: -CPU Type and Model -Kernel Version -Amount of time since the system was last booted, in the form dd:hh:mm:ss This is all on Ubuntu 8.04 I have looked through my Linux Kernel book but it is very vague about how …

Member Avatar for dkalita
0
193
Member Avatar for Iam3R

written a code for finding nth last element but no idea how to caluculate complexity. how can i make this, of 0(n) complexity. [CODE]// p is position of element to find int nthlast(struct node *n, int p) { struct node *f, *s; if(n) { int cnt=0; f = n;// start …

0
97
Member Avatar for xxunknown321

Write a C++ program that ask the user for the name of a file. The program must have a function that prompt the user to enter a file name and open the file. The program should display the last ten lines of the file on the screen. Each line of …

Member Avatar for xxunknown321
0
187
Member Avatar for mr_steve

I am attempting to write a simple chess program (starting with just pawns), and am currently at the stage of initialising the board. The initial board is declared using an array of numbers, with '0' indicating a white piece, '1' indicating a black piece and '2' indicating an empty square. …

Member Avatar for mr_steve
0
170
Member Avatar for aronemz

I really need help to convert decimal number to equivalent ASCII. I store decimal value in x. for example int x = 255; and I want to display it also as '255' in HyperTerminal. Hope someone can help me :)

Member Avatar for aronemz
0
101
Member Avatar for timaquerra

hello, i'm making program which repeatedly (through while) gets input from the user ... program should stop whenever user enters "\n" (or enter button)! thanks in advance!

Member Avatar for gerard4143
0
84
Member Avatar for Wtyy

I am writing a number guessing game, but it request to give hints to player when he guess wrong. And I need to narrow the range to be the hints, what should I write to do this function?

Member Avatar for gusano79
0
118
Member Avatar for mitsuevo

[code] float decimal = 2.345324 float dec_points = decimal%1; [/code] hey guys, I have a small but trivial problem... i have been trying to do the above but i keep getting a error... "error C2296: '%' : illegal, left operand has type 'float'" Anyone got a clue? Thanks guys!

Member Avatar for Dave Sinkula
0
78
Member Avatar for ch.ankit87

HI can anyone help me to write this programe in c Q ; WRITE A PROGRAM TO DETERMINE AND PRINT THE SUM OF THE FOLLOWING HARMONIC SERIES FOR A GIVEN VALUE OF N; 1+1/2+1/3+14+....................1/N THE VALUE SHOULD BE GIVEN INTERACTIVELY THROUGH THE TERMINAL

Member Avatar for nirav99
0
117
Member Avatar for gandolf III

Hi, this C program is to remove duplicates. HOwever it doesnt always print out a result and when it does it screws it up sometimes. [CODE]# include <stdio.h> # include "simpio.h" # include "genlib.h" main() { int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,word; word=getchar(); a='a'; b='b'; c='c'; d='d'; e='e'; f='f'; g='g'; h='h'; i='i'; j='j'; k='k'; …

Member Avatar for dkalita
0
112
Member Avatar for dinamit875

hi everyone, i have a program code here, its working, but as soon as im trying to add results debugger breaks after adding score, can anyone help me to fix this problem. Program is working ok. heres the code: [code] #include <stdio.h> #include <string.h> void addTeam(char[50], int); void calculateResult(int, int, …

Member Avatar for dinamit875
0
138
Member Avatar for LennieKuah

Hi there, Being a newbie to C#Net 2003, I am having problem trying to retrieve data from a specific clicked row on the DataGrid to display the data on the TextBox on the FORM. This is the structure of the DataGird:- Col0 = CustomerId Col1 = First Name Col2 = …

Member Avatar for LennieKuah
0
167
Member Avatar for nika201

I know this forum isn't for databases but I couldn't find a proper one so i post here. (my original post is at forums.mysql.com, but not much seems to be happening there) can MySQL server be started as a globally accessible server by using libmysqld? For example, can a application …

Member Avatar for nika201
0
143
Member Avatar for auracabarcas

hi, i have been unable to solve a problem related to C (i'am a newbie girl). I've googled around and maybe I have a flat learning curve :-( the fact is that i need to write a program that reads from a .txt file and print the output to another …

Member Avatar for Aia
0
914
Member Avatar for OSiRiSsk

Hello, is me again, im trying to improve my program with another function it should print as many senteces on one line in the output, as user will enter as the parameter in the command line sentenece is characterized with sign '.' if you have sentences wchich ends with '...' …

Member Avatar for automart
0
151
Member Avatar for yasaswyg

I made a program that finds the ROT 13, but theres a little thing thats messing it up for me. Its supposed to find the ROT 13 of each character but when i run it, it gives me some funky character in return [CODE]#include <stdio.h> #include <string.h> int rot13(int c) …

Member Avatar for yasaswyg
0
139
Member Avatar for kavitha1591
Member Avatar for rimmmeee
0
192
Member Avatar for anitha joe

Hey All, I am a newbie in C programming. I have written a program which has a separate function to send messages to 2 neighbours in the same network. This function is called from the main program. Also I have a thread which is created by the main function. The …

Member Avatar for BestJewSinceJC
0
99
Member Avatar for rudz
Member Avatar for ham130489

I am working in Linux 2.14 kernel, and I have an assignment. I want to save for every process , the files it opens and closes , and the time he did that. for example : for process aaa : opening "file1" opening "file2" closing "file1" opening "file3" closing "file3" …

Member Avatar for gerard4143
0
185
Member Avatar for katbury

I am trying to code a math tutor program that will have random numbers generated. Any suggestions would be greatful. Output suppose to be: I am having problems with this code. I keep switching it around and can not seem to get it right. This is what output suppose to …

Member Avatar for melepuram
0
105
Member Avatar for rudz

plz plz urgent im a beginner in unix. can someone reply asap . what are kernel modules?what role do they plan in building and runnig a kernel?what happens if the linux kernel did not support modules?

Member Avatar for rudz
0
137
Member Avatar for timaquerra

Hello guys! I'm new to C language and I need help to write a program which searches specific word in text file using Binary Search and count the number of comparisons!!! My text file consist of following data: apple book clock dog elephant fat hello key lucky moon olive paper …

Member Avatar for timaquerra
0
122

The End.