15,551 Topics
| |
Hello. I am having a tough time understanding the concept of double linked list. For now, i understand double linked list has 2 links, one forward and another one previous. data is in the middle. when inserting must check where to insert. if previous is equal to null, then can … | |
can c connect with database like mysql,access or sql server ? | |
Hello! I made a program in Dev c++ in windows that does several string functions.It works perfect in windows but when I tried to use it in Linux(ubuntu and CentOs), linux make the executable file which means it has no syntact error or something but when I try the several … | |
Im supposed to make a little game in which you're supposed to guess a letter in 6 tries. It reads the letters from a text file. I get a bunch of errors and dont really know what to do. Any suggestions? #define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #define MAXGUESSES 6 //this function … | |
in my exam, there was a question: what is linux/command which can't be ignored in any way? write the command to kill a process having id 1234 ? my answer was : SIGKILL and for second part i have written a C code function kill(1234,SIGKILL). now my teacher is saying … | |
I am receiving this error markup.c: In function ‘GetPrice’: markup.c:16:23: error: ‘markup’ undeclared (first use in this function) markup.c:16:23: note: each undeclared identifier is reported only once for each function it appears in markup.c:17:1: error: ‘output’ undeclared (first use in this function) here is my codes // File: markup.c #include<stdio.h> … | |
#include <stdio.h> main() { char *s1, *s2; printf("Enter string 1 :"); scanf("%s", s1); printf("Enter String 2 :"); scanf("%s", s2); printf("%s\n%s", s1, s2); } The output of 1st string is right and the output of 2nd string is wrong (i.e. (null)) Can any 1 explain what is going behind? | |
main() { printf("\nab"); printf("\bsi"); printf("\rha"); } output =hai could you please explain me how output came out to be "hai"? | |
I've recently started college at Digipen, and have developed carpal tunnel already from all the writing/coding/etc... but fortunately for me, I'm learning to be a programmer, and have already made a few programs to assist with things like opening command prompt/bat files faster/without clicking, etc. Since clicking the mouse is … | |
**Because it is a compile-time operator that, in order to calculate the size of an object, requires type information that is only available at compile-time. This doesn't hold for C++.** i have read this statement roght now when implementing one library function. why it doesn't hold for C++? secondly, i … | |
I am trying to write a program to make a list of books using linked list. I am using C language. My program crashes as soon as I finish entering the list. It is supposed to print the list before exiting. Any ideas ? //Defining what libraries should be included. … | |
Guys I have to implement two algorithm using Pseudocodes in order to genarate formal concepts... but the implemented code doesn't give the expected results i want ... ![Inclose1](/attachments/large/3/Inclose1.jpg "Inclose1") ![Iscanonical1](/attachments/large/3/Iscanonical1.jpg "Iscanonical1") These are the two algorithms i wanted to implement and the expected result is Concept - 1 [0,1,2,3,4] [] … | |
Write a program to input a sentence until user presses esc or enter key. Calculate the number of spaces, small letters, capital letters and vowels. It should also print the length of the sentence. If user enter a character other than space or alphabet, it should not be displayed on … | |
i want to take the 1st argument from commandline, ie argv[1] and assign it to a `char target[80]` i know im making some very stupid beginer mistakes... but just cant understand what :( this is my code: #include <stdio.h> #include <string.h> void converge(char *targ, char *src); int main(char *argc[],char *argv[]) … | |
hi, actually I am learning C from past 1 year now and have learnt alot in C. I have read many many books and have solved alot problems in C. now, i am thinking so as to do some kind of project in C/C++. can anyone suggest me some kind … | |
I'm required to write a packet sniffer in the C programming language and Identify the Packet as IP, ARP, or Broadcast and count how many packets of each. I'm able to get IP packets identified and counted, but don't seem to be seeing any ARP or Broadcasts correctly or count … | |
char c[]= "JOJO1993"; char *p =c; printf( "%s", p+p[3] -p [1]) ; this is a code snippet. p is a pointer and when it is used as *(p+3) means 4th character. but my question how can a char pointer can be used as pointer to first byte of any object … | |
| Hey guys, I'm really stuck on this problem. I think you have to do backward recursion, but don't know how to go about it. I just need help with the algorthim for the function "backtracking". Find the best cheapest way to get from city 1 to city 2. I have … |
I'm in a class where the professor has just thrown us into the world of C with no help at all. So I would really appreciate any help anyone can give. I know Java and Visual Basic pretty well, so I'm not completely new and lost, I just don't understand … | |
Im getting double free error's from this? Why? 2d array standard implementation. any clues? int **m = malloc(5 * sizeof(int)); int i,j; for(i = 0; i < 5; i++) m[i] = malloc(5 * sizeof(int)); for(i = 0; i< 5; i++) free(m[i]); free(m); | |
I am trying to write a program that converts a string of numerals to integers. The program I have written gives me an invalid output. Any ideas what I have done wrong ? //Defining what libraries should be included. #include <stdio.h> #include<math.h> int strIntegerTmp(char *string, int collect); int strInteger(char *string); … | |
HI , I have a basic question to ask. how do i open a .txt file in C ? i am using the code shown below which is always telling that "file not found". #include <stdio.h> main() { FILE*fp ; fp = fopen ( "PR1.txt","r" ) ; if( fp == … | |
# include<stdio.h> # include<conio.h> void main() { int s1[10],s2[10],s3[10],total[10],per[10],i; char name[20],pid[10]; clrscr(); printf("==================== Marksheet ======================"); printf("\n\n\n"); for(i=0;i<3;i++) { printf("\n Enter your name:"); scanf("%s",name[i]); printf("\n Enter your PID:"); scanf("%s",pid[i]); printf("\n Enter your Subject1:"); scanf("%d",&s1[i]); printf("\n Enter your Subject2:"); scanf("%d",&s2[i]); printf("\n Enter your Subject3:"); scanf("%d",&s3[i]); } printf(" \n ===================== RESULT OF MARKSHEET … | |
Ok guys, I'm back with new code. I got help from my professor on the problem, but the USB drive I'm using deleted all of his work and I can't remember what he did to get it all to work. I need to get the file (titled lab2.dat): This is … | |
Does anyone know tutorials for link list to be able insert,delete,cout list,give id and time void list_insert( UINT time, UINT id, UINT event) { } void list_head_delete() { } UINT list_head_event() { work_ptr = list_head; if(work_ptr == NULL) { return 0; } else{ printf("Should print the list head \n"); return … | |
Basically I am attempting a HW assignment for questions that a frequently asked in interviews. I am not sure if I am having problems with the coding or actually understanding what they question is asking for. Basically I am asked to find an element in a sorted array and that … | |
i am trying to make a program where i have a server with multiple clients, where a client sends a message to the server and when the server replies to it, the server broadcasts the reply to all the clients. the code has some error and is not working. i … | |
A program which displays the prime factors of a given number, all the 'hard' work is done by the [B]factorize()[/B] function: [CODE=c] /* Find out the prime factors * of a given number and print * them on the screen */ void factorize(int n) { int d = 2; if(n … | |
struct node { int data; struct node **next; }; can we use like this??? | |
| Hey, so i'm having some problems with my message passing code. Ultimately, what i'm trying to do is use the msgget/snd/rcv commands to send the pid of the parent to the child, and visa versa. However, i'm getting an invalid argument error fr my msgsnd in the child process. My … |
The End.