c tag

1304 questions


1 answers
98 views
0
It's the calculation code for the four-day operation using Java generic stack, but the nullPointerException error keeps popping up

It's a code that uses generic stacksI keep getting a nullpointerception error like that.Below is the full code. } import java.util.*;class GStack<T> {static int top;Object [] stck;public GStack(...

2 years ago

1 answers
34 views
0
Write a program using a recursive call to get a natural number n and express it as a sum of natural numbers less than n

There's a question, How to take a natural number n and express it as a sum of natural numbers less than n. Write a program that outputs an index using a recursive call.Please give me a clear answer in...

c
2 years ago

1 answers
71 views
0
c Language // free function related question.

I'm implementing the stack as an array, but in the code below,After copying in the main function, delivering the copied stack If free is used, a compilation error does not appear, but if you run it, f...

2 years ago

1 answers
35 views
0
It's a language question!!

char* arr[34] = { 0,1, 2, 3, 4,.....,33 };I'm going to put 0-33 in the arr arrangementRather than hitting it one by one,I want to turn the for statement around and implement it

c
2 years ago

1 answers
31 views
0
Number of language questions

char str[2000];scanf(%[^\n], str);printf(%s, str);char str1[2001];fgets(str1, sizeof(str1), stdin);printf(%s, str1);Enter the string first in the code above.After the string is stored in the str buffe...

c
2 years ago

1 answers
56 views
0
c Language sparse matrix Question!

How do you write a function that compares the subscripts (i,j) and (x,y) of the elements in two matrices and the order of the elements given?int Compare(int i, int j, int x, int y) if((i,j) < (x,y)...

2 years ago

1 answers
27 views
0
Escape with infinite loop char()

// Enter code here#include <stdio.h>#include <math.h>double dist(a, b, c, d) { double result; result = sqrt((double)(a - c)*(a - c) + (double)(b - d)*(b - d)); return result;}int main(void...

c
2 years ago

1 answers
89 views
0
The list is converted into a json form through ajax communication and sent to the view page, but only json comes out... (Capture you)

In this way. Originally, when you press the search button on the web page, you send the data through Ajax communicationgoIt's a format that converts it into Json But I didn't even write printWrite The...

2 years ago

1 answers
135 views
0
Multiple While questions

...... int sum=0, num=0, i=0;while(i<5){ while(num<=0) {printf(Enter a number greater than 0): , i+1); scanf(%d, &num); } sum+=num; num=0; i++;}printf(total: %d \n, sum);return 0;}If I ent...

2 years ago

1 answers
29 views
0
Code error used for dynamic assignment!..

#include<stdio.h>#include<stdlib.h>void main(void){ char *mes; char *mes2; char *mes3; int i, j,temp=1; FILE *fp = fopen(Readme.txt, rb); FILE *fp2 = fopen(readm.txt, wb); long dw; if (fp)...

c
2 years ago
« - 68 - »

© 2024 OneMinuteCode. All rights reserved.