- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 9
- Posts with Downvotes
- 8
- Downvoting Members
- 7
Me in C world
- Interests
- Basketball, programming, photoshop
Re:
Write a C program to Remove even numbers and fill it with zeros. Note: You can use only one loop for your logic. Two variables apart from the array. Input array 1,2,3,4,5,6 Output 1,3,5,0,0,0 |
|
Hello, I'm trying to display the google map in a bootstrap modal. But only a part of the map is visible not the complete map. here's my modal code, followed by the javascript for the map <div id="geo_modal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" … |
|
I have a rich text box in my winform. I want to format the text so that i can write a simple C code in it. I mean the indentation should be done accordingly (like the code tag on websites). Is it possible?? |
|
Hi everyone, I was going through a tutorial blog for speech recognition, and tried the following code Which is supposed to print "Hello world" on the screen. But it generates an error InvalidOperationException on line 16 and says "The language for the grammar does not match the language of the … |
|
I'm using a TableLayoutPanel which will contain a few dynamically generated LinkLabel's I get everything except the extra spaces in 1st and 2nd row. I've attached a snapshot through screecast. Can anyone tell me how to remove this extra thing? Heres the snap shot link : http://screencast.com/t/dZqRzSZU |
|
Hi everyone, I know that we can pass string as command line argument and use it as we want. But, can we pass a text like "this or that" (with several spaces)?? Is there any way?? |
|
odd mountain is a list of odd numbers going up from 1 and then back to 1. e.g. odd_mountain of size 5 is [1,3,5,3,1] odd_mountain of size 4 is [1,3,3,1] Hint: use the list functions and a builtin function. Can anyone help me in this? all my tries are going … |
|
I found this question on the internet, > Create a text file with name filename and about size bytes. The file should contain > an incrementing number on each line starting with 0. (ie) 0, 1, 2, 3, .... as many are required to make the file size > just … |
|
I wrote a code which fills numbers into the file and when the file exceeds the size given, it stops adding data. But whenever i run the code there is an indefinite run in the data and the size of file just goes off the chart! Please help!! def create_file_numbers(filename, … |
|
I have a generator function, i've filled in the function if there are no more_seqs. But I feel trouble if there are more sequences. I need to generate 1 tuple at a time. if the function call is generate_zip(range(5),range(3),range(4),range(5)) then the tuple generated should be (0,0,0,0) (1,1,1,1) n so on … |
|
I have a list say word = ["engine","ant","aeiou"] I need to sort the list according to the number of vowels in the list elements. And this sort must change the input as well. I tried writing the code, by using zip() and a few ops i'm getting the required answer … |
|
Hello everyone! I got this question in a book.. I thought of doing it using map() or using loops return the first count multiples of number in desc order in a list. e.g call with input (3,2) returns [6,3] call with input(5,3) returns [15,10, 5] but the hint along with … |
|
I was trying to solve the Euler problem number 50, and wrote the following code and got the answer as, no. of primes = 536 and prime value is 958577 But, when i search the answer for this on internet, it says 543 primes and prime is 997651 why does … |
|
Hi, I was working on an application but i'm stuck at a point now.. I'm able to send the chat messages but unable to receive any... I have two threads, 1 for sending message and another for receiving but receiving part isn't working! I think the problem is with multithreading! … |
|
Hi, I am using gcc compiler to compile the program and build an exe I used this command to compile gcc program.cpp -g -o program (generates program.exe and runs fine) But, if i write the same thing in system("gcc program.cpp -g -o program"); programmatically, then the exe is generated but, … |
|
Hi everyone! i'm getting strange outputs for the following code.. can anyone explain the reason for such output?? :/ I use DEV c++ int color_choose(void) { char clr[10]; int i; /*enum { green,aqua,red,purple,yellow,white }a;*/ printf("\n\n\tText color can be changed here! This the list of available colors: "); printf("\n\n\t Green\t Aqua\t … |
|
hi.. I'm trying to read a .docx file using apache poi api methods.. But i'm facing a few problems.. Can anyone suggest me the changes to be made in this code?? package apiole; import java.io.*; import org.apache.poi.xwpf.extractor.XWPFWordExtractor; public class Apiole { public static void main(String[] args) throws IOException { File … |
|
I wrote a program, in which my code is checking the word entered by user and the word in a file. If the words are not same, the file is deleted. i closed the file using **fclose(fp)**, (where fp is file pointer) and to delete the file i used **system("del … |
|
I'm new to win32 application building using C. I'm using DEV C++ and I'm able to get a window, by using the "windows application" icon in DEV. I want to know how to display our text on to the window??? That'll be very helpfull! This is the readymade code generated … |
|
How to manipulate .doc files using c++ ??? I'm working on a project which needs this manipulation.. But, I feel that it is not possible to manipulate .doc files :/ can anyone help me out here?? |
|
Hi, I'm working on a small project and i'm stuck in a part where I need to replace the existing word in file with a new one. I really have no idea about it.. I'm posting the function block where i'm facing the problem void team::team_list() { string str = … |
|
hi everyone! I'm working on project which Generates certificates for different students. The interface takes the input of Name, College, Secured position and generates the certificate... but I want to generate all the certificates at once. So, to avoid overlapping of the file names, i want to generate different file … |
|
#include <iomanip> #include <iostream> using namespace std; int main() { cout << left << setw(10) << "Hello"<< "*" << right << setw(4) << "World\n"; } is the above code correct?? I think the alignments are not working for me.. MY output Hello^^^^^^^^^*World (represented spaces as ^) |
|
Hi.. can anyone tell me what is the meaning of this error?? [Error] cannot convert 'std::string {aka std::basic_string<char>}' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)' When I'm taking TeamName as char TeamName[30]; , the compiler shows linker error. what could be the problem? I use DEV C++ … |
|
Hi, I wrote the following program for stacks using linked list! But, the display function doesn't seem to work! can anyone point out the errors in this? Thankyou! #include <iostream> #include <cstdlib> #include <iomanip> using namespace std; template <class T> class stack { T data; stack<T> *top; stack<T> *next; public: … |
|
Re:
Hi all, I have a simple program: #include<iostream> using namespace std; 6 int main() { char x; do { scanf("%c", x); } while (x != 'y'); return 0; } and for some reason when i gcc test.c i get "test.c:1:20: fatal error: iostream: No such fiel or directory compilation terminated." … |
|
What would be the error code for this?? Am I using perror() at right place?? The output shows "No error" #include <stdio.h> #include <conio.h> #define MAX_VAL 32000 int main() { start: int x; printf("Enter a value for x= "); scanf("%d", &x); if (x > MAX_VAL) { perror(""); getch(); system("cls"); goto … |
|
Re:
I am trying to make a program that generates a random number and asks the user to input the random number generated by the computer. Anyone know how to do this? This is my program: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int one; time_t … |
|
Re:
Okay so here's the thing...I came across a code of my classmate that i'm not familiar with...the only thing i know is the printf is the same as cout...right??can someone explain this in iosteam.h form?? #include <stdio.h> void bubble_sort(long [], long); int main() { long array[100], n, c; printf("Enter number … |
|
Re:
any idea on how to change strcpy in c++ int main() { //all the winning combination strcpy(winKey[1].key, "123"); strcpy(winKey[2].key, "456"); strcpy(winKey[3].key, "789"); strcpy(winKey[4].key, "147"); strcpy(winKey[5].key, "258"); strcpy(winKey[6].key, "369"); strcpy(winKey[7].key, "159"); strcpy(winKey[8].key, "357"); } |