15,552 Topics

Member Avatar for
Member Avatar for mayankjain05_1

this is the question. www.codechef.com/problems/CTEAMS i wrote this code http://ideone.com/h5Gimy it gives success but when i pass an input it gives sigsev error.please someone help!!

Member Avatar for mayankjain05_1
0
218
Member Avatar for enkitosh

Hey everoyne. I'm wondering If it's possible to construct a switch statement which takes in a character and determines weither that character is a number or not, or an alphabetical number. switch(i) /*character*/ { case '0': /*ok it's a number, doesn't have to be zero, any number from 0-9*/ case …

Member Avatar for enkitosh
0
314
Member Avatar for napninjanx

Like I have this eBook called C Programming Language 2nd Edition and It does not tell me where to write the programming codes. Do you have to write It In a notepad?

Member Avatar for Moschops
0
2K
Member Avatar for subith86

I am planning to write an application in windows which will temporarily block the configured websites irrespective of what browser I am using. As I am completely a newbie in this I want to know where to start. Please provide me with any useful links which can help me. If …

Member Avatar for deceptikon
0
122
Member Avatar for shanki himanshu

why it doesnot works for values other than 0 and -1 i mean when i tried to print values of array 'a' after memset() then it shows incorrect values. int a[100]; memset(a,0,sizeof(a)); ///it works memset(a,-1,sizeof(a)); ///it works memset(a,1,sizeof(a)); ///it doesnt

Member Avatar for Tumlee
0
546
Member Avatar for E.RANJANI

I want do a small project based on c programming. so send me a project names......

Member Avatar for tux4life
0
55
Member Avatar for elrond

#include<stdio.h> void main() {int a[100];int i;int getchar;int sum; for(i=0;i<=100;i++) while {((a[i]=getchar())!=EOF)} i++; printf("your no is =%d",&a[i]); i=0; sum=0; while(i<=100) {sum=sum+((a[i])^3); } i++; if(sum==a[100]) printf("number is armstrong"); else printf("number is normal"); not working,can someone give me an alternative usiing arrays,i got the for loop,want to execute using arrays!

Member Avatar for elrond
0
260
Member Avatar for nitin1

i have a undirected graph and i want to print a cycle with length >=k (given) , can you suggest me a algo ? i dont want any code, snippet. i am hoping for hint and algo for this. thanks. it is guaratned that cycle of length >=k exists.. thanks.

Member Avatar for Taywin
0
139
Member Avatar for prakhs

Hi, I came across one question from codechef. [Click Here](http://www.codechef.com/problems/J7) Here, we are given P and S. Let l, b, h be the length, breadth, height of the box. we have these two inequalities 4*(l+b+h) <= P 2*(l*b+b*h+h*l) <= S We have to maximise the volume which is l*b*h. We …

Member Avatar for Adak
0
183
Member Avatar for mayankjain05

suppose i declare an array of size 10(a[10]) and i try to use even 11th or 12th element...that is i try to put some data...and later extract from a[10] or a[11] ..is it possible..ans with respect to both c and c++..

Member Avatar for mayankjain05
0
106
Member Avatar for n@nnouss@

I have a project and a part of it is related to sha 1 encryption using openMP. Any help would be highly appreciated.

Member Avatar for n@nnouss@
0
647
Member Avatar for hust921

Hello everyone. I made this "text file de/encryption" program as my first big C project. It's working pretty decent, and takes a lot of special characters and tabs without any problems. I have tested the code by encrypting and then decrypting some source code, and compared the output with the …

Member Avatar for hust921
0
230
Member Avatar for aswekown

Hi, I have a piece of code here. #include <stdio.h> int main() { // jimmy and masked_raider are just aliases for the same memory address. They’re pointing to the same place char masked_raider[] = "Alive"; char *jimmy = masked_raider; printf("Masked raider is %s, Jimmy is %s\n", masked_raider, jimmy); masked_raider[0] = …

Member Avatar for deceptikon
0
124
Member Avatar for fsdhf_20

Who can help me to solve this problem? The problem is attached to the post.

Member Avatar for CrazyDieter
0
164
Member Avatar for samii1017

Okay, so this is only a portion of my code, but what I have to do is have the user enter their weight, and then choose from options like eat cake, pizza, work out, and a few others. If they choose eat easy work out, they enter the number of …

Member Avatar for Moschops
0
159
Member Avatar for lala166

I need to convert that example table: `unsigned char key[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}` To char text[16]="0102030405060708" I have no idea how to do this in the simpliest way.

Member Avatar for lala166
0
45
Member Avatar for lewashby

I've been told to study up on four c segments: code, data, stack, heap. I know that googleing stack and heap will probably give me a mountain of information. But what the heck is code and data? If I type c code into google I'M going to get a lot …

Member Avatar for Ancient Dragon
0
152
Member Avatar for ehsann.sharif

**guys I wrote this, there's no errors, no warnings... but it keeps crashing on execution.. any ideas ?????** #include <stdio.h> #include <stdlib.h> #include <string.h> struct data { char * name ; int grade ; }; int compare_ints(const void *a, const void *b); int compare_strings(const void *x, const void *y); struct …

Member Avatar for Ancient Dragon
0
212
Member Avatar for avidwan

How to make a reverse string program in [c programming](http://www.programmingpad.com) language ?

Member Avatar for rustysynate
0
271
Member Avatar for Jenniferting

So i have write the following code (above) and now for the second part i am required to apply the Complex Number into finding the voltage across the Resistor in a series RLC circuit. The following tasks : Create an executable program Resonant Circuit, which allows you to output the …

Member Avatar for Jenniferting
0
2K
Member Avatar for Bchandaria

error is coming while linking the file error is undefined symbol _clearviewport in module ... i have used graphics.h library function dos.h and also stdlib.h can any one help me out to identify this problem?

Member Avatar for deceptikon
0
137
Member Avatar for ThatBitchYeah

#include<stdio.h> #include<stdlib.h> struct complex { int real,imag; }; int main() { int choice; struct complex x, y, z; { printf("Press 1 to add two complex numbers.\n"); printf("Press 2 to subtract two complex numbers.\n"); printf("Press 3 to multiply two complex numbers.\n"); printf("Press 4 to divide two complex numbers.\n"); printf("Enter your choice\n"); …

Member Avatar for veducator
0
439
Member Avatar for yunniesshi

Please help me with this I really need your help. Thank you so much. #define EMPTY __________ #define DELETED __________ #define max 1100 #define setSize 20 typedef struct { unsigned long ID; char Lname[16],Fname[24],MI; char course[8],year; }Student; typedef struct { Student Stud; int link /*used to link to next synonyms*/ …

Member Avatar for deceptikon
0
254
Member Avatar for yunniesshi

Hi please help me with this. My head really hurts from attempting to answer this question. Thanks a lot! #define maxCells 1000 #define maxCS 11 #define maxIT 19 typedef struct { char LN[16], FN[24], MI; }nametype; typedef struct studtype { unsigned long ID; nametype name; char course[8]; int yr; }student; …

Member Avatar for deceptikon
0
527
Member Avatar for unahuche

Please, what are the major things to look out for when writing a c-program report?

Member Avatar for deceptikon
-1
30
Member Avatar for Dolby779

Hello all, recently got a piece of coursework I completely know nothing of. It is shown below: Your task is to write a file archive utility similar to that of the Unix tar program. This program will be a command line program (i.e. there will be no graphical user interface). …

Member Avatar for Nick Evan
0
411
Member Avatar for mattboy64

I'm almost finished coding the last of my C program on stock inventory but in the last two functions (one being my main function and the other a void function) the compiler gives an error stating that there a Parse Issue and that an expected identifier or "(" is missing …

Member Avatar for Adak
0
221
Member Avatar for mattboy64

I'm coding an inventory program in C and I need the variable "stock1" in more than two seperate functions I'm not sure as to how they're supposed to be manipulated and read by the seperate functions nor do I understand how to declare them If I declare them as global …

Member Avatar for mattboy64
0
222
Member Avatar for general2012

please help .i have written this programme just to enter data to a linked list.but it isnt working.cant understand where the problem is.how can i make this work and how can i make this programme evev better #include<stdio.h> #include<stdlib.h> #define NULL 0 struct linked{ char data[20]; struct linked *next; //pointer …

Member Avatar for general2012
0
110
Member Avatar for mattboy64

These days im using xcode and its a bit of annoyingly good amounts of changes from borland which im used to But i keep getting error for this printf ("\nThe amount of First Class cars Stocks remaining are: %d", &stock1); (while stock1 is declared: int stock1) and it says format …

Member Avatar for Tumlee
0
179

The End.