15,551 Topics
| |
Can anybody provide me c code for snake and ladder | |
is there any function to add a character at the end of a string? or algorithm? | |
Hi everyone!! i have a problem here. i am writing a database program in C in which i used files and structures to store data. but my code is not running :/ here is my code:: #include<stdio.h> #include<conio.h> #include<stdlib.h> struct std_info { char name[15]; char seatno[9]; float ssc; float hsc; … | |
we need sys/ipc.h and sys/msg.h these header files for networking...purpose | |
I have this assignment where the user has six guesses for the correct letter out of 1 to 4 games. I only have one error that won't let me pass my build and I can't seem to figure out how to fix it. Can anyone help me figure out what … | |
#include<stdio.h> #include<stdlib.h> struct tree { int info; struct tree * left; struct tree *right; }; struct tree *root=NULL; struct tree * insert(struct tree *root,int item); void display(struct tree *root); int main() { int a,b,c,item; do { printf("press 1 to enter an element,2 to display,3 to quit\n"); scanf("%d",&a); if(a==1) { printf("enter … | |
Here is the question: Write a program containing a function that takes has 2 integer parameters x and y and returns the value of x^2 + y^2. My codes: #include<stdio.h> #include<stdlib.h> int Myfun(int x,int y); int main() { int n,p,k,sum=0; printf("Enter 1st integer: "); scanf("%d", &n); printf("Enter 2nd integer: "); … | |
this code have to print all the prime numbers from 1 to 100 but when i run it cmd crash #include <stdio.h> int main(){ int a,b,c,d; for(a = 0;a <= 100;a++){ d = 0; for(b = 0;b <= 100;b++){ c = a % b; if (c == 0) d++; if … | |
Hi, I'm developing with a BeagleBoard Black (BBB) under Ubuntu using C. When the BBB is powered on I'm doing many time controlled tasks. My problem happens when NTP changes the clock and all my counters are not valid. Normally BBB starts with no date/time set, some seconds later (if … | |
how to convert float number (92.764 or 2.14) to character string without using sprintf?. | |
**Sure hope your still around Ancient Dragon your a life saver, and a great teacher** What I'm after-->I am trying to send a message to a button on the parent window-- Ok here's my problem. I am trying to automate an install for various applications. For my first automation process. … | |
Hello all, I'm trying to read in a group of letters each on a new line and have the user guess them depending on how many games they want to play. My program works fine but I've noticed while testing it that for any more attemps, fscanf just keeps the … | |
Hi, Please tell me the c code for finding a basic solution to a system of linear equations!Please help me as I am messed with the Gauss-Jordan Method.I am not getting the correct idea to do this in my project. Please help me soon. | |
Here is the question: Write a function which accepts an integer N and returns the sum of first N numbers. and here are my codes: #include<stdio.h> #include<stdlib.h> int Myfun(int x); int main() { int a, sum; printf("Enter an integer: "); scanf("%d", &a); printf("sum is %d\n", sum); system("pause"); return (1); } … | |
Can anyone help me with corelated random numebr generation code using C? | |
Just need help with regards to this part, i'm meant to use scanf() to read a string from keyboard and return number of characters read, so i'm supposed to read a character string. The scan must then terminate at whitespace. A null character is stored at the end of the … | |
In Las Vegas random numbers move billions of Dollars in and out of gamblers' pockets. For the mildly inquisitive here is a test of three simple generators. | |
good day to all, can anyone help me how can my program read if a letter is inputted again it prompts "letter inputted already"? heres my code: #include <stdio.h> #include <string.h> #include <conio.h> int main() { char alphabet[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char letter; int i; for(i = 0; i < 26; … | |
If i use macros as functions , then at compilation time , that macros will me be written as function code. so is it better than inline functions and then why don't we use macro always to write the functions as it will speed up our execution. so writing macro … | |
Actually, I have a .csv file which has (userID,movieID,rating) seprated by commas. now, I have to read it and also make another .csv in the output. Can anyone tell me how to read a .csv file and take that data in integer (as userid , rating etc are integers). from … | |
Hey guys, I'm using OpenCV to get an image from my webcam and then run it through code. It's supposed to be live feed, and I got this code from an online tutorial (somewhat revised): #include <stdio.h> #include <stdlib.h> #include <opencv/cvaux.h> #include <opencv/highgui.h> //opencv libraries #include <opencv/cxcore.h> CvCapture* camCapture; //opencv … | |
# /*Given an array arr[] of n integers, construct a Product Array prod[] (of same size) such that prod[i] is equal to the product of all the elements of arr[] except arr[i]. My code is printing garbage value.Pls someone suggest me what is wrong and how can I correct it..Thank … | |
Hey guys what I'm about to ask isn't for what I really need it for but learning how to use the rand() function in this manner will help me apply it to what I need it for. Lets say I wanted to ask the user for a random integer such … | |
Simply by interchanging the numbers in printf I.e, 8. printf("before swap:First Var.=%d\tSecond Var.=%d\n" ,i,j); 9.printf("After Swap: First Var.d\n" ,j,i); | |
hi. i am working on a project to find colors. i've stucked in finding purple color. i've used many application for finding color ranges and i've tested many numbers. i am using cvInRangeS function. i really appreciate if someone helps me. thanks. | |
Hello everyone I have a task to generate 300 random particles in a 2-D plane ( 1 x 1) The steps are given as : 1. Generate two numbers 2. Scale them to max dimension 3. Repeat 1 and 2 in a 'for loop' to generate 300 particles ans store … | |
Ok so this is the code. hEdit=CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOVSCROLL|ES_AUTOHSCROLL, 50, 100, 200, 100, hWnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), NULL); ok so that creates the asset (our edit field to type into). I can use the below code to display what is in the text box in a message box. LPWSTR buffer[256]; … | |
Accept the string from the user. Find the date from the given string with ddmmyyyy format and display the output as:"date found = " Eg:input:Eg: abc0712201345bye output:date found =07122013 how to do this? |
The End.