15,551 Topics

Member Avatar for
Member Avatar for dev.bardoliya.5
Member Avatar for rithish

hello can any one give a easiest and understandble link or video tutorial for cursor implementation of linked list very hard to understand please suggest a good link and understandable

Member Avatar for rithish
0
3K
Member Avatar for rithish
Member Avatar for rithish
0
216
Member Avatar for deceptikon

Provided below is a bare bones dynamic array library. The game is to extend this library with new primitives and features that interest you, that you've needed in the past, or that you feel may be useful. The intention of this game is to give some of the newer folks …

Member Avatar for myk45
0
250
Member Avatar for suhrud.l

For an array of n int variables, When does binary search perform better than ternary search?? Also, reverse case, ie when does ternary search perform better than binary search? Why is binary search a more preferred method of searching for integers entered in an array??

Member Avatar for c1c2c3c4c
0
241
Member Avatar for rebelstar

Hello, i am facing some problem with a memcpy. I have a struct. lets us say struct { unsigned in[6] ; //32 bytes in all }strb; struct { // FIRST HALF unsigned int a; char b[1020]; .. .. //LAST ENTRY strb a[512]; //512* 32 = 16384 bytes }A; Now, ihave …

Member Avatar for dx9_programmer
0
163
Member Avatar for somjit{}

read [here](http://crasseux.com/books/ctutorial/getline.html) that fgets() is bad, although no explanation given... also i think the default getline() isnt in C , is it?? **why is fgets() bad??** also, the page on getline says it takes in char** as the 1st input type... whats a '**'? why is it used?? i couldnt …

Member Avatar for somjit{}
0
530
Member Avatar for nitin1

#include <stdio.h> #include <math.h> int main(void) { int number; double result; printf ("\n Introduce an integer: "); scanf ("%i", &number); result= sqrt (number); if ((result * result)== number) printf ("\n The integer HAS a perfect square \n\n"); else printf ("\n The integer DOES NOT HAVE a perfect square \n\n"); } …

Member Avatar for somjit{}
0
170
Member Avatar for smith32

Hi, I'm working on a quick sort for double linked list. All work except the first item. I don't know what is wrong. Can u plz help me find the error? Here is my code. dlist_t* quick_sort(dlist_t* list) { dlnode_t *tnode = NULL, *first = NULL, *last = NULL; first …

Member Avatar for smith32
0
244
Member Avatar for zychos

I am getting the following errors when i gcc my code: 44) unixs1 $ gcc whoisserver.c whoisserver.c: In function `main': whoisserver.c:59: warning: passing arg 2 of `bind' from incompatible pointer type whoisserver.c:71: warning: passing arg 2 of `accept' from incompatible pointer type Undefined first referenced symbol in file bind /var/tmp//ccSx8OhK.o …

Member Avatar for zychos
0
190
Member Avatar for noahjonesnoah

Hi all, I have a question about comparing the contents of characters in arrays to see if they are the same. When I try and do something like this: char output_1[5]; char output_2[5]; int i; for (i = 0; i < 5; i++) { if (table_1[i][0] == table_x1[i]) { output_1[i] …

Member Avatar for noahjonesnoah
0
133
Member Avatar for nitin1

actually , I am working on a project and i need to sort the co-ordinates in the increasing y value. input: 1 2 3 4 5 6 6 6 7 8 4 5 like this, and i need to sort them in the increasing y value. my approach: i think …

Member Avatar for nitin1
0
113
Member Avatar for shanki himanshu

Since in XOR linked list current pointer store the XOR of addresses of previous and next node. my question is how do we XOR two pointers?

Member Avatar for deceptikon
0
135
Member Avatar for ashdeekon

Hi I have the program for inserion of keys into the B tree and displaying them.But i want to write a code for the b tree in C so that each key in the B tree should have 4 attributes. I'm having trouble modifying the structure pointers in the program …

Member Avatar for deceptikon
0
150
Member Avatar for prakhs

http://www.codechef.com/problems/NUKES I'm getting time limit exceeded in my code... Please some one help me out with this code. My algorithm is when A - ((N+1) ^ (p+1)) < 0 then pth chamber will have 1 particle and the new value of A in my recursive function is A - ((N+1) …

Member Avatar for L7Sqr
0
661
Member Avatar for scapu

Hello, Can anybody help me in this program. [B]Write a C program to find the square root of a given number?[/B] I can understand only C and please i need answer in C only. In this question i should not use function and i have to write a code for …

Member Avatar for goyalPriya
0
3K
Member Avatar for HelloJarvis

Hey guys, I'm loading from a dictionary with a variable called "buffer". I'm trying to copy "buffer" in to another array word for word. For some reason, when I try using `strncpy()`, it yields a segfault. Here is my code (assuming "LETTERS" is 29: bool load(string filename) { // open …

Member Avatar for dx9_programmer
0
244
Member Avatar for squizzel

Ok so for extra credit in my software/hardware design class I have to locate duplicate entries in a defined string matrix. I am really close but having trouble. Case 3 is where I am trying to acomplish the goal. Any tips? My problem is that while it will print duplicates, …

Member Avatar for squizzel
0
166
Member Avatar for timetraveller1992

I'm new to network programming. And I skimmed a few pages of beej programming guide and found some useful info but couldn't clear one doubt. We use bind to associate a sockaddr_in structure with the socket descriptor so that the kernel can send data to the network adapter and thereby …

Member Avatar for timetraveller1992
0
145
Member Avatar for clarisse.ibarra

how can i make a program that will input a number and convert it into a word using array , and also not using string.h library?

Member Avatar for deceptikon
0
111
Member Avatar for kiwi101

In this assignment the user has to input a matrix and then the program has to show that matrix and the transpose of it. I've got that part running. My teacher added a tweak. Basically when the user inputs the matrix the program has to only ask the number of …

Member Avatar for deceptikon
0
169
Member Avatar for priya_pawar

Write a program (in a single .c file) with a queue of strings implemented using array. You should write ite a queue type. The program reads a set of strings stored in a file (filename given on command line as argument) and inserts each string in the queue. Then it …

Member Avatar for Ancient Dragon
-1
171
Member Avatar for wanderevil

so i have to make a "Space invaders" like game (just a simple one though) but i dont know what codes should i use this is the code : void movingX() { int xcol = 1, xrow = 1; int ycol = 40, yrow = 24; int xbombcol = xcol, …

Member Avatar for deceptikon
0
149
Member Avatar for agentc0re

I am currently in an introductory c++ class and am working assignment that sorts data. We recently covered structs and I decided to use structs to approach the problem rather than create 3 arrays to hold the information from our data file. The trouble i'm having is when i'm trying …

Member Avatar for agentc0re
0
275
Member Avatar for binaryjc

Given 3 arrays,one accepting Strings the rest integers,lets say:A1[ ],A2[ ],A3[ ]. We get the difference of each element of A2[ ] and A3[ ] to a previously define values. take for example this code: //preference.c #include<stdio.h> #include<string.h> typedef char * string; //for STRINGS char name; int test; // number …

Member Avatar for WaltP
0
249
Member Avatar for kiwi101

Could someone PLEASE HELP ME!!! :( I need to write a program that reads an integer matrix A from standard input and outputs the input matrix and the transpose. The input matrix A is limited to have at most 10 rows and 10 columns. Given a matrix A has m …

Member Avatar for WaltP
0
155
Member Avatar for BoulderMen

I am trying to write a program to copy the contents of one stack to another. The following is the code that I came up with. It give me some syntax errors but I cannot seems to see any. Can anyone help ? //Defining what libraries should be included. #include …

Member Avatar for np complete
0
912
Member Avatar for HelloJarvis

Hey guys, I'm working with `strchr` and, for some reason, am getting a segfault. My program takes a string, iterates through the characters of that string, and adds a score to the "game" based on what letter the current character is. That sounds complicated, but my code will explain it: …

Member Avatar for HelloJarvis
0
1K
Member Avatar for cih1091

Hi guys, I am trying to write a program that takes in a file, which has the last name first name and grade of a student. I then need to sort the grades from highest score to lowest with the corresponding names and then calculate the average grade. I have …

Member Avatar for WaltP
0
113
Member Avatar for salakgocap

main() { FILE *file = fopen ("COMMAND.txt", "r"); FILE *file1 = fopen ("LOG.log", "a"); if (file != NULL) { char line [255]; /* Max line Size*/ while (fgets (line, sizeof line, file ) != NULL) /* Reading a line */ { char first[10]; if (sscanf(line, "%9s", first) ==1) { fprintf(file1, …

Member Avatar for WaltP
1
100

The End.