15,554 Topics

Member Avatar for
Member Avatar for Yimeng

I've learned the hello.c using FUSE. It can create a hello file under mountfile. But I've no idea about how to create a folder under the mountfile and then create hello under mountfile/folderIcreate. then I can use cat mountfile/folderIcreate/hello the code is similar to the simple hello.c. #define FUSE_USE_VERSION 30 …

Member Avatar for Yimeng
0
359
Member Avatar for nekoleon64

My Name is Leonard E. Norwood Jr. I'm Undergraduate student from Norfolk State University in Norfolk Virginia. Getting down to the point, my program is supposed to print out a list of pre-set numbers in reversal. I used pointers for this, however, something went wrong so I'm trying my best …

Member Avatar for iamthwee
0
372
Member Avatar for Netcode

#include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char *first, *second, *third; first = malloc(888); second = malloc(22); third = malloc(22); strcpy(first, argv[1]); strcpy(second, argv[2]); free(first); free(second); free(third); return(0); } Like I said before, I need help learning C and trying to figure out my errors. With this …

Member Avatar for deceptikon
0
204
Member Avatar for Que336

C# Interview tomorrow Hello fellow programmers. I know this doesn't have anything to do with code but I really need some advice. I have a .NET(C#) interview tomorrow for a junior vacancy. The problem I have is that all my experience is based on PHP. I have a good understanding …

Member Avatar for deceptikon
-1
311
Member Avatar for Netcode

Am trying to write a c program to do the following; • Write on the screen: ``Please enter a positive number: ''. • Accept a number from the user. • Keep prompting for more numbers until -1 is entered • Output the sum of all entered numbers excluding -1. • …

Member Avatar for Ancient Dragon
0
166
Member Avatar for Netcode

Hi all, trying to read up on C to get acquainted with the language. Got an exercise am trying to answer and i may need your help to know if am right. I have this code as below, and am asked, what lines have buffer length checking errors. int main( …

Member Avatar for Netcode
0
294
Member Avatar for Jephthah_1

i need a C program to enter user info. and calculate cost ... a program like a point of sale (POS) system

Member Avatar for rubberman
0
74
Member Avatar for bumsfeld

A simple program to show you how to create a table of Fahrenheit and Celsius values using a for loop. You may be able to learn from this code.

Member Avatar for rubberman
1
277
Member Avatar for cambalinho

i'm learning win32 from Programming Windows Fifth Edition book, but i need ask something about these code: /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− SCRNSIZE.C −− Displays screen size in a message box (c) Charles Petzold, 1998 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ #include <windows.h> #include <tchar.h> #include <stdio.h> int CDECL MessageBoxPrintf (TCHAR * szCaption, TCHAR * szFormat, ...) { TCHAR …

Member Avatar for cambalinho
0
363
Member Avatar for COKEDUDE

Can someone please explain this error and how to fix it? This worked perfectly on my computer but it stopped working when I transferred it to another computer. int hash = 0; char *strings[100]; if((int)strings[i] != 0) if((int) strings[hash] != 0) while((int) strings[hash] != 0) if((int)strings[hash] != 0) if((int)strings[hash] != …

Member Avatar for Ancient Dragon
0
550
Member Avatar for COKEDUDE

I know this is how you read from a file. I also want to print my output to the same name of the file plus ".txt". So if my file is called "text" I want to print it to a file called "text.txt". #include <stdio.h> #include <stdlib.h> #include <stdbool.h> int …

Member Avatar for Ancient Dragon
0
334
Member Avatar for COKEDUDE

What does creating a pointer of a function do? I'm not used to getValue being a pointer. char* getValue(char* string); I'm used to something like this. char getValue(char* string);

Member Avatar for sepp2k
0
121
Member Avatar for PESOF

hello everyone i was wondering if you guys can help me.. i am really tired i havent slept for 2 days trieng to figure out how to do this i am a begginer in this and my prof asked me a game which is http://www.miniclip.com/games/fat-slice/en/ he wants it in c …

Member Avatar for iamthwee
0
310
Member Avatar for Stefan_2

I need to write a code that is gonna remove a whole row/column in a matrix(either static or dynamic matrix)

Member Avatar for Ancient Dragon
0
386
Member Avatar for ishaan3731

i have this code which tries to enter data into an array of string(char ptr) called token.To do this i have used a while loop to obtain a string as user input and put that string into the token array one by one. But when i try to print the …

Member Avatar for ishaan3731
0
200
Member Avatar for rob2

Hi guys I have OS of the WB150F camera. you can download it here: https://www.mediafire.com/?jmshouy4c937yw3 I have several question about it: 1- What do these files do? MakeAv, MakeAvf, sde6 and all files in the "Tools" folder 2- What is the usage of the "brcz.h" file (in this address: \ip\include)? …

Member Avatar for iamthwee
0
170
Member Avatar for Bchandaria

i want a full code for finding different ways to climb the n-stair case problem that is each step is either 1 or 2 stairs. Eg- a 3-stairs staircase can be climbed in 3 ways :1-1,1-2,2-1. Using subset method can any one can help me out for this problem?

Member Avatar for iamthwee
0
189
Member Avatar for fadoua_1

Hi, I created a structure Vector and implement some functions to make the new defined type (vector) dynamically allocated and resized (inspired from the C++ implementation of the dynamic arrays : vector). I need to assign a structure to every vector element but I am not sure that I am …

Member Avatar for Ancient Dragon
0
382
Member Avatar for rory.starkweather.7

This is a trivial program in Turbo C 2.01. It is intended to show that C can do arithmetic with mixed data types, and what the results are: #include <stdio.h> void main(void) { int num1 = 5; float num2 = 2; int num3; num3 = num1 / num2; printf( "%f\n", …

Member Avatar for rory.starkweather.7
0
151
Member Avatar for Bchandaria

Starts with 2 uneqaul positive numbers on the board. 2players move in turn to write on board a positive number equal to the difference of any 2 numbers already written on the board. the new number written on the board should not be repeated. the player who can not write …

Member Avatar for Ancient Dragon
0
119
Member Avatar for inspire_all

#include<stdio.h> #include<conio.h> int main() { char cyp[150],eng[26]; scanf("%s",eng); gets(cyp); getch(); return 0; } eng is accepted but only one letter is accepted for cyp.

Member Avatar for rory.starkweather.7
0
385
Member Avatar for Jaks_maths

This Program prints the numbers in given array(Row-Major Order) in Spiral order. Ex: Order Is 3*4 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Spiral Order Of Matrix is 11 12 13 14 18 22 26 25 24 23 19 15 16 …

Member Avatar for rubberman
0
293
Member Avatar for glao

Hello , I have the following code : int a = 2; int *ptr = &a; int *second = &a + 1; printf("\n ptr = %p\n", ptr); printf("\n second = %p\n", second); which just prints the address of pointers and the address of second is 4bytes next the ptr. Output: …

Member Avatar for glao
0
184
Member Avatar for parth2911
Member Avatar for SerenityG

Hello, I have this program that runs in C++ that I need to run in C. This is my program in C++: #include <iostream> #include <string> #include <cctype> using namespace std; char encode (char plaintext) { if (isupper(plaintext)) { if (plaintext > 'M') { plaintext += 13; } else { …

Member Avatar for David W
0
229
Member Avatar for ferizhandi

hi all i want to open a file but this file in other directory.and i want to use this function: int open( char *filename, int access, int permission ); i can not use other function, because i have use only system call function. when file exists beside of my code, …

Member Avatar for naveen1993
0
248
Member Avatar for satish_dukkipat

int i,j=4; i=j++*++j*j--; what is the result of i and how it is evaluated please help me. the result is 125 and i don't understand the evaluation part

Member Avatar for deceptikon
0
223
Member Avatar for Razahcy
Member Avatar for Schol-R-LEA
-1
232
Member Avatar for daniel.benniah

I tried to enter the following code and the compiler says "[Error] expected ')' before string constant" char string[6]; strcpy(string,"HELLO\0"); can somebody please help me

Member Avatar for naveen1993
0
558
Member Avatar for infatuate

So I'm trying to write a program that will read a program that will be reading characters/strings in regular text and will output the information in hexadecimal format. An example of such is this "UNAME" = "55 4E 41 4D 45 28 31 29" in hexadecimal format. I just don't …

Member Avatar for naveen1993
0
156

The End.