15,548 Topics

Member Avatar for
Member Avatar for surfer2009

i want to wrie a code which determines whether a given input is relocatable object file or executable file? i have knowledge about C .....but this task is totally new for me. can anyone please guide me?

Member Avatar for Ancient Dragon
0
87
Member Avatar for dos_killer

i am trying to implement a simple keylogger... my code works fine and is able to detect simple keystrokes.... the problem that im experiencing is that whenever a key is pressed it remains pressed forever even after i release the key unless i press some key again...and if i try …

Member Avatar for KonkaNok
0
145
Member Avatar for florisvd

Hello, I'm making a scoreboard and I'm using multiplexing 7 segments. With a remote control I'm controlling the counting of the digits. I have two big problems with this. The first is that I can count just 2 times by sending b to the UDR. After that I have to …

0
78
Member Avatar for addbot101

You are to write a program to track the vehicles that are parked in and out of a parking lot. When the program runs, the user should be able to the total and available parking spaces. The program should also display the menu: [1] In [2] Out [3] View Parking …

Member Avatar for ravenous
-3
564
Member Avatar for RodEsp

Hey guys, so I'm trying to write a little program that will put together any number of strings passed to it into a single string and then print out that string backwards. I think I have everything correct but I keep getting a "Segmentation fault (core dumped)" error after compiling …

Member Avatar for RodEsp
0
1K
Member Avatar for PC_Intense

I have an assignment in which I need to rite an OpenGL program that displays a green square on a black background. Does anyone know a good free software I can download to run this. I'm mostly familiar with java, and since this is in C, I don't know where …

Member Avatar for myk45
0
86
Member Avatar for prgrmmngaccnt

I have a txfile.txt file which has the following data: 3 2716 16253 7721 35149 972 2614 I am trying to read the first integer into a variable using this code: [code=c] #include <stdio.h> #include <stdlib.h> int main() { int num_cust[1]; int result; FILE *fp; if( (fp = fopen("tsfile.txt", "r")) …

Member Avatar for prgrmmngaccnt
0
157
Member Avatar for melisko

Hey guys iam new in c and iam learning on my own, I have a task in book which is well complicated(at least for me) .(it want me to create the file , insert the text then copy text without vowels into a new file). I know i have long …

Member Avatar for melisko
0
135
Member Avatar for arshi9464

what to do if i want to execute some statements in a loop till the user enters any key? i did this earlier but have forgotten the logic... example:- while(1) { printf("abc"); /*i want this code infinitely, but as the user presses any particular key it should stop the execution*/ …

Member Avatar for arshi9464
0
87
Member Avatar for Adami

Hello all, I have a problem with a function I wrote. I wrote a main() that takes from current library a *.c file (that the user gives by the argv[1]) and make a copy of itself but without the comments and saves it as *.c1, so after this operation we …

Member Avatar for Ancient Dragon
0
164
Member Avatar for DJSAN10

Are constants, defined by using the keyword const , external linkage or internal linkage? Can constants be modified using pointers? What about constants defined using by #define?

Member Avatar for DJSAN10
0
130
Member Avatar for IamAuser

Hello All, I am not sure why my algorithm is not working for this problem. I need to store space separated arguments in an array char* argBuffer[], so I can later make some system calls . The problem is that the last argument is writes over all indexes of the …

Member Avatar for IamAuser
0
5K
Member Avatar for threwup

So heres the guidelines: Write a C program that simulates a 3-bit multiplexor. Your program should first read the 3 control inputs; then read the eight source inputs; then print the output of the multiplexor. When you read the control inputs, let the last input be the least significant bit. …

Member Avatar for threwup
0
2K
Member Avatar for SakuraPink

I'm new to C and I have a question I think it's not that complicated. I'm trying to write a code that creates strings like : File1,File2,File3, etc. Here is my code: [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> #include <string.h> int main(void){ char string1[80]="File"; char string2[80]=""; int number = 10; …

Member Avatar for WaltP
0
106
Member Avatar for mackemforever

I've been set in a lab session at University the task of creating a program which can perform one of a variety of calculations, with it performing the one specified by the user, and with it looping back after every calculation however it is the looping which is causing me …

Member Avatar for chrjs
0
145
Member Avatar for FL Botanist

WARNING: I am a botanist, not a programmer. If you are offended by newbie questions, please jump to the next thread. I'm in the Environmental Horticulture at the University of Florida and I'm trying to build an online, multiple-entry key to help students identify the plant families. I have permission …

Member Avatar for FL Botanist
0
245
Member Avatar for newC

Hi. I am new in C programming. I am tasked to complete a program. The hardest part in programming is to understand the logic of a program. Please explain to how and why the algorithm works. I have commented the parts that i need know of/needs help in green. Your …

Member Avatar for chrjs
0
122
Member Avatar for dos_killer

hello im new to linux programming and i am experiencing a bit of diffuclty with pthreads...basically the pthread_create() function in my code below i tend to pass an integer variable as the argument for my runner() function but i get a warning and an error..i have tried several ways of …

Member Avatar for gerard4143
0
760
Member Avatar for gaurav_13191

Hello all, I am third year student pursuing computer science engineering and I want to develop a software which can be coded in C and includes integrating it with database for data. I really need help for some ideas which are new(I need to develop something which is original or …

Member Avatar for pseudorandom21
0
146
Member Avatar for katisss

#define print_int(a) printf("%s : %d\n",#a,(a)) int y=10; print_int(y) i am taking a class and have been asked to explain why this is bad... So i guess stringifing #a is the problem. It does work, so why is it dangerous?

Member Avatar for katisss
0
79
Member Avatar for juanp

I'm having a lot of trouble getting my code to compile. It basically has this structure: [CODE]Headers: a.h, b.h, c.h CXX: a.cxx, b.cxx, c.xx[/CODE] And my main.cpp of course. The problem is that my classes link each other, ie. a uses something from class b and b uses something from …

Member Avatar for Fbody
1
107
Member Avatar for Paritosh Das

[CODE]/*Simply change the path in initgraph(&gdriver, &gmode, "d:\\TC\\BGI"); e.g if your working directory is E write "E:\\TC\\BGI"*/ #include<graphics.h> #include<stdio.h> #include<conio.h> #include<math.h> #include<dos.h> int main() { float i,k,r; int gdriver = DETECT, gmode,c,j,l=57,m=56; initgraph(&gdriver, &gmode, "d:\\TC\\BGI"); printf("House constructed by Paritosh:"); printf("\nFor the visibility in different colors enter any integer: "); scanf("%d",&c); …

Member Avatar for Adak
-1
141
Member Avatar for rockerjhr

could someone explain to me why the compiler(gcc) outputs a warning that the control reaches the end of a non void function? [CODE] #include <stdio.h> #include "stack.h" #include "globals.h" #include "stack_interface.h" #define ERR_PUSH "Error in pushing symbol (character #%d).\n" #define ERR_POP "Error in popping symbol tp match character #%d.\n" #define …

Member Avatar for nezachem
0
217
Member Avatar for Dexxta27

[CODE]typedef struct electro { char name[20]; int access_number; char address[50]; float balance_due; }; electro account[10]; electro account[0].balance_due=$ 120.52; electro account[0].address[50]={Cane Gardens};[/CODE] Can someone tell em how to correct this piece of code. I'm using Codeblocks and it says it " expected an initializer before '.' " in the two last …

Member Avatar for Dexxta27
0
209
Member Avatar for anirudhruia

[CODE]#include<stdio.h> #include<string.h>\ struct name { char contact[20]; long int no; }; int main() { int i,check; char ch[20]; struct name cse2[10],*p; p=&cse2[10]; for(i=0;i<10;i++) { printf("Please enter contact name: "); scanf("%s",&(p+i)->contact[20]); printf("mobile no: "); scanf("%ld",&(p+i)->no); } printf("Please enter a contact name to find his\\her mobile no: "); gets(ch); for(i=0;i<10;i++) { check=strcmp(ch,(p+i)->contact[20]); …

Member Avatar for Moschops
0
82
Member Avatar for tomtetlaw

Say you had a struct like this: [code] typedef struct{ int i; short s; unsigned char pad[2]; } test_t; [/code] What would be the point of adding the member pad as doesn't the compiler automatically do things like that? I saw a struct like this looking in some source code …

Member Avatar for Ancient Dragon
0
80
Member Avatar for CodeAerial

HMm... already frustrated at it... But is there something wrong in my malloc? Everytime I try to display the record, it gives me random things as answer(see code below)? Was it that I didn't free it or was I wrong in declaring malloc itself? Thanks in advance. [CODE] #include <stdio.h> …

Member Avatar for CodeAerial
0
280
Member Avatar for srisrisri

Hello Can anyone tell me the way to reverse a string in C and only in """"C"""? How to get a string through one by one characters of the same? And if I use the following I get errors String name="hai"; len=strlen(name); for(i=0;i<len;i++) { scanf("%c",name[i]); } how to get name …

Member Avatar for minhajakhter
0
305
Member Avatar for yassop

Hi all. I have a problem with my calculator. #include <stdio.h> int a, b; /* value entered by user */ char c, choice; int main() { printf("\nThis program is a calculator.\n"); printf("Enter your calculation: "); scanf("%d%c%d", &a,&c,&b); if (c=='+') printf("The answer is %d", a+b); if (c=='-') printf("The answer is %d", …

Member Avatar for yassop
0
235
Member Avatar for iamsmooth

I'm fairly new to C. I've tried googling but haven't found anything. Can anyone direct me to some relevant functions or readings or whatever that might help with this problem? Basically I need to be able to give a directory as an argument and it needs to be able to …

Member Avatar for griswolf
0
168

The End.