15,550 Topics

Member Avatar for
Member Avatar for PacoLoko

ok, i'm trying to do a simple DES program... and i need help to do the permutation that's my first simple code, i need to chance the order of bits of 3 chars i have the table table={11,15,3,7,12,5,8,17,24,21,4,1,6,9,2,13,10,14,23,18,20,19,22,16} //24 bits i have idea how to do about 8 bits[a simple …

0
48
Member Avatar for gatzos_barca

Hello All, I just want to ask what this programme does. Actually i know what it does, i just wanna know the exact operation of it. [code=c] char *u ; //declare the string char k; unsigned int x; // declare integer int i; u = " University " ; k …

Member Avatar for ithelp
0
127
Member Avatar for ssriram

Hi all, I'm working on a GPS/GSM based project and I want to convert the RMC parameters to BINARY format. Actual RMC Sentence looks like this: $GPRMC,171004.031,A, 3658.4246,N,12201.3362,W,23.44,255.42, 060206 Interpretation as follows: 171004.031 = UTC of position fix (hours, mins, secs, decimal secs) A = GPS Status, Valid (V = …

Member Avatar for Belrog
0
208
Member Avatar for vonzul

This program should traverse a directory and save the file names into an array so I can manipulate data within the files. The problem is that the program prints the name of the files in the first loop, but it only saves the last file name in the array. Below …

Member Avatar for vonzul
0
3K
Member Avatar for msr

I know this thread is "a little bit" old, but i would like if you can help me. Im using sprintf(). This is my code: [CODE] int countDigits(int inteiro,int max){ char *string; string = (char *) calloc(max+1,sizeof(char)); sprintf(string,"%d",inteiro); return strlen(string); }[/CODE] However if the first digit of "inteiro" is a …

Member Avatar for mcldev
-1
344
Member Avatar for edouard89

Hello All, well this is my first post after a while of inactivity. I have run into a problem. I have an assignment for school, but when I debug my program using Dev C++(BloodShed) it give me a segmentation fault. I am reading from a file that looks like this: …

Member Avatar for edouard89
0
153
Member Avatar for devilofangel

i am new at programming basic.. i got this problem at school... i want to seek help from you!..its all about inserting and deleting arrays in c language!.. for example: given this output: Menu Operations: [1]Insert at beginning [2]Insert at middle [3]Insert at End [4]Show array elements [5]Delete array elements …

Member Avatar for jwenting
0
81
Member Avatar for dammest
Member Avatar for dammest

Implement the filters: longLines, linesWith. The filters have similar structure. They accept one parameter from the command line (length limit or a string of characters) and then read, one by one, all lines from the standard input. Each line is tested. The only difference consists in different functions used to …

Member Avatar for WaltP
0
110
Member Avatar for dammest
Member Avatar for cs378

Hi I am programming in Unix. My task is really simple, but I don't know and where to debug this problem. My C program opens up the "ls" manual and makes an exact copy to a new file. However my program stops/freezes in the middle of read. (It works fine …

Member Avatar for Ancient Dragon
0
121
Member Avatar for jasssvj

Hi! I have to make a program, wich lists all files in current dir, and then save all file names into an array. My program doesn't work ! Can you tell me why? Thanks a lot:)[code=c] #include <dirent.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <dirent.h> int main(void) { FILE …

Member Avatar for WaltP
0
239
Member Avatar for rxylion

[B]Well As What I Have Expected There You Are Again![/B] actually id like to ask if ever you could give me a very simple Array program. I read books but i wanted to have other simple situations about using array.

Member Avatar for Aia
0
90
Member Avatar for controlsi

This code is suppose to read from an inputed file and then fill and array and sort the student records with in that file. Im having alot of trouble debugging myself and this program is due with in two days. the input will look like lastname, firstname grade ssn birthday …

Member Avatar for Aia
0
87
Member Avatar for controlsi

Hello, well this portion of code is basically just the structures from the program. everytime i compile the program i get an error at the INFOstructure. i am using these structure in a program that read from a file and prints the data to the screen. my problem is that …

Member Avatar for controlsi
1
83
Member Avatar for ppallavi

Hi , Inside a recursive function i have a static variable, when i return that static variable , it's value becomes zero. count = trimWS(someXMLNode); i get count as 0 , but when i debug countWS was 9. Pls help me why this is happening and what is the right …

Member Avatar for ppallavi
0
78
Member Avatar for stilllearning

Hello, I looked for this on the forums, and found an invalid link to a tutorial. But I'd appreciate it very much if someone can point me to a tutorial on hash tables, that includes a basic implementation in C or C++. Thanks a lot.

Member Avatar for stilllearning
0
146
Member Avatar for Barefootsanders

Hey everyone, I was wondering if someone could explain to me the following bit of code. I understand != in logic but i dont know how to read it like this: [CODE] float y = 0.01, x = 0.005, z; z = 2 * x + (y != 0.001); [/CODE] …

Member Avatar for Aia
0
108
Member Avatar for pupu14

can anyone give a code for cpu scheduling algorithm for FCFS, SRTF and PRIORITY please it to my <snip email> tnx..

Member Avatar for ithelp
-1
85
Member Avatar for mmonaco27

I'm implementing a heapsort on a void array. But I'm having trouble with line 6: [code=c]void siftdown(char *start, char *end, size_t size) { char *curr = start; char *child; while (curr*2 + size <= end)[/code] I cast the pointers to char because they have a length of one, and I …

Member Avatar for mmonaco27
0
247
Member Avatar for ravina_malik
Member Avatar for sivaslieko++

I read two binary numbers which are separeted by a coma(1010,1000111) from a texfile into two differen linkedlist as below: [code] while (!feof(fout)) { ch=fgetc(fout); if(ch==','){ printf("\n"); control=1; }else{ if(control==0){ if(ch=='1' || ch=='0'){ curr = (item *)malloc(sizeof(item)); curr->val = ch; curr->next = head; head = curr; length1++; } }else{ if(!feof(fout)){ …

Member Avatar for danzona
0
103
Member Avatar for tat2dlady

Does anyone know basic pseudocode for a balanced k-way sort-merge? Thanks for any info you may have.

Member Avatar for WaltP
0
415
Member Avatar for sathishkumar.e

Hi, I'm a newbie to this group. I heard a question in C to swap the two strings using command line arguments but without using the temp. string,pointer or array Can anyone help me how to do this.

Member Avatar for Duoas
0
133
Member Avatar for Barefootsanders

I have a doubly linked list and I know it gets created with the proper values. For some reason when I run through my print function it, only prints 1/2 of the list and then gives me this: the instruction at "0x7c93426d" referenced memory at "0x00000000". the memory could not …

Member Avatar for Barefootsanders
0
92
Member Avatar for rajeev_028
Member Avatar for pedro martinez

How can I create a C program to delete the internet explorer history file? How can I create a path?

Member Avatar for WaltP
0
89
Member Avatar for boyz

can any one write a c program in which both the if and else statements should execute???

Member Avatar for WaltP
0
116
Member Avatar for johnnyjohn20

Hi, Would anybody know a way to repeat a program, for example the user has reached the end and a prompt is shown on screen Would you like to try again? Press y, n. I have managed to do this using goto command but this as ive read is a …

Member Avatar for WaltP
0
271
Member Avatar for CaitlynCraft

Hello fellow coders! I am kind of stuck on one aspect of a project that I am currently working on. I have a code for a number guessing game in "C" but I need some assistance as to how to add a "high score" feature to the game. Basically, I …

Member Avatar for WaltP
1
1K

The End.