Posts
 
Reputation
Joined
Last Seen
Ranked #268
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
94% Quality Score
Upvotes Received
31
Posts with Upvotes
25
Upvoting Members
21
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
11 Commented Posts
0 Endorsements
Ranked #540
~29.1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for asif49

I feel like I'm in need of a career mentor or atleast some guidance in which field to pursue. Within 2 years I will have a degree in Computer Science. Without being too arrogant, I'm quite sure it will be a 1:1 or at worst a 2:1. Software Development is …

Member Avatar for Wandaga1
0
342
Member Avatar for murtazamzk

[CODE]#include <stdlib.h> #include <stdio.h> #include<conio.h> void main() { int ch; clrscr(); printf("\n\n~~~~~~~~~~~~~~~~~SHUTDOWN MENU~~~~~~~~~~~~~~~~~~~\n"); printf("1.Shutdown\n2.Restart\n3.Logoff\n4.Hibernate\n5.exit"); printf("\nEnter choice : "); scanf("%d",&ch); switch(ch) { case 1:system("shutdown -s"); break; case 2:system("shutdown -r"); break; case 3:system("shutdown -l"); break; case 4:system("shutdown -h"); break; case 5:exit(1); break; default:printf("Invalid choice"); } getch(); }[/CODE]

Member Avatar for deceptikon
1
449
Member Avatar for sneekula

Just wondered which computer language is best suited for preteen students. Any ideas or experiences?

Member Avatar for Sanchixx
0
476
Member Avatar for sparsh610

hello friends, i have some problem with the concept of singly link list,,, don't know how to read it backward pls help

Member Avatar for mike_2000_17
0
842
Member Avatar for tubby123

Hey, Is there any difference between the 2 syntax, ie, str = "This is a test"; and strcpy(str,"This is a test"); I think, both of them, malloc some random 200 addresses, and give the starting location of the 200 chunk to the pointer variable 'ptr'. #include<stdio.h> char* str; int main(void) …

Member Avatar for Perry31
0
101
Member Avatar for mohsin1992

#include<stdio.h> #include<string.h> void recurse(char [],const char *); int main() { char *charset="abcdefghij"; recurse("",charset); } void recurse(char str[],const char *charset) { int len; len=strlen(str); strcat(str,charset[len+1]); if(len<strlen(charset)) recurse(str,charset); printf("%s",str); } Like the question says, what is wrong here? This is the logic of my program 1. Keep a string called charset which …

Member Avatar for Trentacle
0
2K
Member Avatar for iAndrewMeyer

Am I freeing and declaring this 2d array correctly? int **ratings; ratings = (int**)malloc(sizeof(int *) * (numCouples*2)); for(i=0; i<numCouples*2*numCouples;i++) ratings[i] = (int*)malloc(sizeof(int) * numCouples); //Data is read into each array position for(i=0; i<numCouples*2;i++) for(j=0;j<numCouples;j++){ fscanf(ifp, "%d", &ratings[i][j]); //printf("%d",ratings[i][j]); } for(i=0;i<(numCouples*2);i++) free(ratings[i]); free(ratings); Thanks Drew

Member Avatar for Trentacle
0
134
Member Avatar for tunisia
Member Avatar for firdousahmad

Help me plz #include <stdio.h> int main ( int argc, char *argv[] ) { if ( argc != 2 ) { printf( "usage: %s filename", argv[0] ); } else { FILE *file = fopen( argv[1], "r" ); if ( file == 0 ) { printf( "Could not open file\n" ); …

Member Avatar for Trentacle
0
89
Member Avatar for jemz

Hi, Can i ask some help what is the best editor to use in learning C language.... By the way which is which language, should or i must to learn C or C++ ?. Thank you in advance.

Member Avatar for Lucaci Andrew
0
304
Member Avatar for firdousahmad

#include<stdio.h> #include<conio.h> #include<string.h> struct person { char name[10]; int rno; }; typedef struct person NAME; NAME stud[10], temp[10]; void main() { int no,i; void sort(int N); clrscr(); fflush(stdin); printf("Enter the number of students in the list\n"); scanf("%d",&no); for(i = 0; i < no; i++) { printf("\nEnter the name of person …

Member Avatar for abrarsyed
0
794
Member Avatar for abrarsyed

#include<conio.h> #include<stdio.h> #include<ctype.h> #include<string.h> int precedence(char c) { switch(c) { case '*': case '/': return(2); case '+': case '-': return(0); } } char *to_postfix(char *infix) { char stack[30],postfix[30]; int i=0,j=0,top=-1; while(infix[i]!=NULL) { if(isalpha(infix[i])||isdigit(infix[i])) { postfix[j++]=infix[i++]; } else if(infix[i]=='(') { stack[++top]=infix[i++]; } else if(infix[i]==')') { while(stack[top]!='(') { postfix[j++]=stack[top--]; } top--; i++; …

Member Avatar for abrarsyed
0
546
Member Avatar for pooh1234qwerty
Member Avatar for pooh1234qwerty
0
183
Member Avatar for tunisia

Trying to convert the following block of perl to python for($row = 0, $mytype = 500; $row < $filearray_count; $row++) { if ($_ eq $filearray[$row][0]) { $mytype = $filearray[$row][1]; print "$row, $mytype, $_ \n"; break; And here is the python attempt. I'm not sure if I'm dealing with $mytype = …

Member Avatar for TrustyTony
0
208
Member Avatar for perllearner007

Okay pardon me for this silly question (I am learning perl!) but how do we run a perl file that has many sub functions. For example, if a file called thisismyfile.pl has following sub functions sub thisismyfunction1 sub thisismyfunction2 where sub thisismyfunction1 will output table 1 and sub thisismyfunction2 will …

Member Avatar for perllearner007
0
146
Member Avatar for rupes0610

I am attempting to remove 3 commas from the file below but it is not working. #!/usr/bin/perl use strict; use warnings; my @data; my @line; open(FH, "error_log"); @data = foreach $line (@data) { if ($line =~ /notice/) { if ($line =~ /rdy/) { $line =~ s/ /,/g; my @L1 = …

Member Avatar for 2teez
0
115
Member Avatar for sammoto

So I'm trying to write a program to play the card game Go Fish, and I can't get the following code to compile: import java.util.Random; public class CardPile { public static final int DECKSIZE = 52; private Card[] cards; private int numCards; public CardPile() { cards = new Card[DECKSIZE]; numCards …

Member Avatar for sammoto
1
406
Member Avatar for choosenalpha

Hi All, I am needing some assistance on how I can grab the values for the number of die that come up as 1, 2, 3, 4, 5 or 6. I have the count variables holding the count for each one that fits the "if statement". But I can't use …

Member Avatar for choosenalpha
1
473
Member Avatar for bufospro

Hi all, I would like to make program reading 300 lines form a file with 24 columns. the 24th column has an integer from 1 to 24, while the others columns are strings. I want to summarize in seperate files this (last) column For example, assdsd, sdsds, asdasda, asda ,asdad, …

Member Avatar for TrustyTony
0
174
Member Avatar for carrot_123

Hi, I am currently learning how to program, and have a code below: int voltage; printf("Voltage\t\tSoC\tDescription\n"); printf("-------\t\t---\t-----------\n"); for (voltage = voltage_min; voltage <= voltage_max; voltage = voltage + step_size_variable){ printf("%d\t\t%0.3d%%\n", voltage, ((voltage - 3000)/1200)*100); } When I run it, the program outputs only 0.00%s, and is not calculating the voltage …

Member Avatar for TrustyTony
0
3K
Member Avatar for abrarsyed
Member Avatar for Trentacle
0
219
Member Avatar for Perry31

I declared one variable in one type (say char x ) and allocated. But i'm assigning integer or some other type value to it. Below is the code snippet which i'm facing problem, char *tempstr = (char*)calloc(1,4); // declaring with char variable tempstr[0] = '2'; // trying to assign 5 …

Member Avatar for WaltP
0
255
Member Avatar for enakta13

I intend to write a GUI java program which convert a decimal(base 10) to hexadecimal(base 16). Floating point decimals are also valid input. the code of my program private void myEnterButtonActionPerformed(java.awt.event.ActionEvent evt) { float mynum; mynum = Float.parseFloat(this.myNumberField.getText()); Float floatObject = Float.valueOf(mynum); myResultField.setText(Float.toHexString(mynum)); } but when I run the program, …

Member Avatar for enakta13
0
424
Member Avatar for nee_88

` Below Code not working :- #include<stdio.h> void main() { char *s; gets(s); printf("%c",s); }

Member Avatar for Sokurenko
0
118
Member Avatar for jpsider

I'm working on a school project, beginner stuff. I need to output the data with 2 decimals. I've tried several variations of [CODE] printf("%4.2f" + variable) [/CODE] But it seems when I use more than one variable it craps out or wont compile. Thoughts? [CODE] public class Conference4 { public …

Member Avatar for jpsider
0
125
Member Avatar for mrprassad

[CODE] main() { char *p="dcis"; while(*p++!='\0'); printf("%s",p); } [/CODE] Why this is printing %s in my unix box with gcc 4.6.1 ?

Member Avatar for Moschops
0
185
Member Avatar for biojet

Hello, Could you please help me in following scenario in Perl scripting? I want to compare two text files & change the charter at the position. Output of this comparision in third file with flags C-CHANGE, N-SAME at the end of line. [CODE]IN PUT1: Posi 3 ATG 2 ACT 1 …

Member Avatar for biojet
0
155
Member Avatar for sync101

Hello, my assignment is to write a postfix calculator. I have written the program. It works well, except for when the user enters in an error. Lets say, user enters "2 A +" it changes the A to a '0'. Which it shouldn't be doing. I have tried strtol() as …

Member Avatar for WaltP
0
182
Member Avatar for coding101

How do strings work? In C we must declare the size of a char array to represent a "string". But in java we do not allocate memory for the size of a string. So how does the string work? Is there a pre deterimed size assigned to strings from the …

Member Avatar for dheaven
0
233
Member Avatar for puppycrazy

my codes occur some problem inside.whn i answered 'N' to the last question(DO YOU WISH TO CONTINUE?(Y/N)), the program will repeat run again, but i cnt enter student name!anyone can help me solve the problem>? [CODE] import java.util.Scanner; public class homewok{ public static void main(String args[]){ Scanner xx = new …

Member Avatar for puppycrazy
0
334