15,552 Topics
| |
I'm doing some homework for a computer systems class and all is well except this one problem that I can't seem to find a solution to due to the limitations. The problem requires me to write a function that performs addition on 32-bit signed integers but saturates the result to … | |
So one of my assignments is to code a MAKEFILE program. Though we discussed this over in class I'm not sure exactly sure how it works. Here's one of the examples we went over: [CODE] ----------------------------------------------------------------------------- # # DELDIR makefile # Old-style MAKEFILE format. Microsoft MAKE V1.x # Similar to … | |
Dear Friends i went a little application for data encryption in c using hill cipher. | |
i want to develop railway reservation system in c in file system. Please help me to build the database..... my mail id is [snipped] | |
I am trying to figure out how to automatically close a simple windows application in C. I know how to create the window. But I have no idea how to get it to automatically close when it has opened without user input/interaction. Basically when it is called upon, I want … | |
Hello Everyone. i have created a XOR Encryption libary in c...well tried with some help. But there is something wrong with my coding as when i try and decrypt a file, it doesnt always decrypt as plain text as some charfacters seem malformed. Please could you help me fix this … | |
Hello I have been using c for dummies along with bloodshed software for a day or so and I tried putting this snippet of code in from the book and I got a syntax error:[CODE]#include <stdio.h> int main() { char name[20]; char color[20]; printf(“What is your name?”); scanf(“%s”,name); printf(“What is … | |
| |
Get_Number function is a function to get input from keyboard, this function restrict the user to pass wrong input........... How to use -> For example we need to take input in any integer variable n call Get_Number() like this [CODE] n=Get_Number(); [/CODE] With Full Back Space support Please comments on … | |
Hello. I am making a program in c from the linux nano complier. I made and tested the program in Dev C++ and it works perfect. When I put it in nano, it complies, but when I run it, it gives a segmentation fault. Please tell me how to fix … | |
Q.Create an equivalent of four function calculator. The program should request the user to enter two numbers and an operator. It should carry out specified arithmetic operation on the two numbers( using switch case).After displaying the result, the program should ask the user if he/she wants to do another calculation.If … | |
I have a program assignment where one part requires a user-defined function where you enter a string with a minimum length of 2 characters and a maximum length of 20 characters. How would I get it to find the length (I believe should be stored into index) of the entered … | |
I am having trouble correctly allocating memory for a parent function that will remain upon the child functions exit. the call to the child function is [code=c]HTTP_packToGen((char*)http_headerContent.HTTP ..[/code] the HTTP variable within http_headerContent is a char pointer that isn't allocated until the child function is called, http_headerContent is a static … | |
I can write char a[] = "hello world"; , but i can not write char a[]; a = "hello world"; why is that ?? | |
Hello All I have some confusion in Declaration and defination of variables. Declaration means ===> where the variables are declared and no memory is allocated. Defination means ===> where the variable is declared and defination is allocated. For eg. if we write (1) int a; printf("%d",a); then it will print … | |
Why do we have to initialize a pointer to a string when it is declared globally ? I mean , [B]This doesnt work[/B] [code=c] #include<stdio.h> #include<conio.h> char *str; int main(void) { gets(str); printf("%s",str); } [/code] [B]But this works[/B] [code=c] char *str="1"; int main(void) { gets(str); printf("%s",str); } [/code] Even upon … | |
suppose i have 3 functions: a() b() and c() both a() and b() can called c(). if function c() is called how do i know who is the caller?? | |
Hallo, Can somebody help me how to find combination between code´s. i have 30+ codes like this 7zv7pj. xjdcsa, efzlfl, xkaadt etd but i dont know any program or something what can i help me get more combination or understand how codes work. Ty for help | |
[B][U]input:--[/U][/B] 3 hi hello my name is abc this is a test [B][U]output:--[/U][/B] hi hello my name is abc this is a test here is the code:-- [CODE]#include<stdio.h> main() { int n,i; char b[100],*c; scanf("%d",&n); for(i=0;i<n;i++) { gets(b); c=b; while(*c !='\0') { putchar(*c); c++; } printf("\n"); } return 0; } … | |
Hello people, I am using Turbo-C Can anyone give me a sample program using the bool array I tried compiling the following code snippet. But it doesnt work. [code] #include<stdio.h> #include<conio.h> int main() { bool a[10]={true}; clrscr(); printf("\nHello World"); getch(); } [/code] It gives the error [B]Undefined Symbol bool[/B]. But … | |
Thanks for your post, can anyone post some books describing some valuable function list of C language which are more close to hardware | |
3) Write a program that reads a 21 by 21 array of characters from a text file. It represents a maze. • Each position can contain either an X or a blank. The borders of the maze are covered by ‘X’ except start and exit points. • Read text file … | |
hey guys, can anyone please show me how to insertion sort an array of strings. | |
what does int main() return and to what does it return That is, in the code snippet, [code] int main() { int a=0,b=5,c; clrscr(); c=a+b; return c; printf("%d",c); getch(); } [/code] 1)What is the expected output ? 2)I tried compiling this and i dont get anything on the screen 3)In … | |
Hey guys! I'm going to start learning C/C++ (again), and I want to start with a very simple program. It should ask to the user a number and, if it is right, run a program. Its been a long time that I don't even touch anything from C, but I … | |
hi all, i have this code which is supposed to display the elements of a char array but the problem is that its displaying funny symbols not the elements. does anyone know why? [CODE]char *list[]={"a","m","t"}; for(i=1; i<=3; i++) { list[i]=(char *)malloc(4*sizeof(char)); } printf("The elements are: "); for(i=1; i<=3; i++) { … | |
I've made this simple timer/alarm for myself for this game I'm playing. I want to use it to inform me of an automated event a few minutes before it happens. It isn't done yet, but I am concerned with how much resources it takes. From the compiler, it takes about … | |
i have a doubt. why cannot we use clrscr() before initializing a variable in C? i mean, why wont this work ? void main() { clrscr(); int a,b; ---- ---- getch(); } It'll give an error saying , "Declaration is not allowed here " Logically speaking , you should be … | |
[B]Good day everyone,[/B] Hope you could help me on this one The program is running but the result is far from what I want please help me... TIA Like this one: [B]Input:[/B] ------------------------------------ Enter first number: 7 Enter second number: 45 ------------------------------------ [B] Output:[/B] ------------------------------------ 7.45 [B]7.00[/B] ------------------------------------ [B]which should … | |
I have tried to make a program that allows inputs into a 1D array. I run the program and the inputs are asked for, but the program simply continues to ask for more inputs. I'm moderately new to C so go easy. Any help would be appreciated Cheers Wonkerloop Heres … |
The End.