15,550 Topics

Member Avatar for
Member Avatar for chamnab
Member Avatar for Ancient Dragon
0
116
Member Avatar for BlueDevil

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 …

Member Avatar for deceptikon
0
207
Member Avatar for colombn4life

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 …

Member Avatar for WaltP
0
250
Member Avatar for nitin1

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 …

Member Avatar for nitin1
0
112
Member Avatar for ali11

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> …

Member Avatar for VatooVatoo
0
186
Member Avatar for prakhs

#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?

Member Avatar for prakhs
0
206
Member Avatar for Swati_1

main() { printf("\nab"); printf("\bsi"); printf("\rha"); } output =hai could you please explain me how output came out to be "hai"?

Member Avatar for np complete
0
130
Member Avatar for Lemony Lime

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 …

Member Avatar for np complete
0
174
Member Avatar for nitin1

**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 …

Member Avatar for myk45
0
265
Member Avatar for BoulderMen

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. …

Member Avatar for sachi059
0
286
Member Avatar for darkenmac

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] [] …

Member Avatar for darkenmac
0
303
Member Avatar for jdadkn

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 …

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

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[]) …

Member Avatar for somjit{}
0
4K
Member Avatar for nitin1

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 …

Member Avatar for Bob
0
170
Member Avatar for jww1232002

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 …

Member Avatar for L7Sqr
0
460
Member Avatar for nitin1

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 …

Member Avatar for nitin1
0
108
Member Avatar for Roman116

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 …

Member Avatar for L7Sqr
0
174
Member Avatar for macdunk11

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 …

Member Avatar for WaltP
0
267
Member Avatar for coding101

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);

Member Avatar for deceptikon
0
110
Member Avatar for BoulderMen

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); …

Member Avatar for WaltP
0
188
Member Avatar for celina1234

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 == …

Member Avatar for VatooVatoo
0
146
Member Avatar for bhavin.chavada

# 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 …

Member Avatar for deceptikon
0
145
Member Avatar for macdunk11

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 …

Member Avatar for deceptikon
0
155
Member Avatar for ccbuilder

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 …

Member Avatar for deceptikon
0
95
Member Avatar for straylight

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 …

Member Avatar for Bob
0
207
Member Avatar for barfi.anana

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 …

Member Avatar for np complete
0
3K
Member Avatar for mvmalderen

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 …

Member Avatar for delta_frost
0
787
Member Avatar for rithish
Member Avatar for delta_frost
-1
110
Member Avatar for BobTheLob

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 …

Member Avatar for allyson
0
2K
Member Avatar for squizzel

Hey all, this is a pretty basic program that will take a use submitted array and call functions to find the max,min and then a function to reverse the array. I have the first two functions written and working but I am having trouble with the reverse array function. The …

Member Avatar for WaltP
0
2K

The End.