15,551 Topics
| |
int main() { printf("%u %s",&"hello",&"hello"); return 0; } can you please explain that how "hello" is working here ? i know it is string constant ? so it is acting as a pointer to a char like i do char *s= "daniweb"; so, if it is the case, then why … | |
Why Can't we use va_list twice? Can any explain me how it creates memory issue ? | |
I'm sorry. These question probably sound very stupid to you people. But to me they are extremely difficult. Imagine being completely ignorant with computers, and signing up for an intermediate level class (I did not take the beginner class)................ and NEEDING an A to make up for the 2 B's … | |
An algorithm runs a given input size n.If n is 4096,the run time is 512 ms .If n is 16384 the run time is 2048 ms .what is the complexity of the algorithm in big-o notaion ? a)o(n^1/2) b)o(n) c)o(nlogn) d)o(n^2) o() is big-oh! is it logical ? I have … | |
Need help with Caesar Cipher. Usually I am aboe to figure the things out with just a small pointer.... but this one escapes me. I need to create a Caesar Cipher. **It must have an array. ** **I must be very simple.**(don't want to use that code where A = … | |
What is the behavioral difference between signal(SIGCHLD,SIG_IGN) and signal(SIGCHLD,SIG_DFL)? If we replace signal(SIGCHLD,SIG_IGN) with signal(SIGCHLD,SIG_DFL), What can be the impact? Will it craete a Zombie process? | |
c prog that take int x and pass it to thread to return x+10 i tried to free()mem i allocate in prog using malloc // problem i get this error Aborted (core dumped) #include <pthread.h> #include <stdio.h> #include <stdlib.h> void *fun(void *TX); int main() { int x =50; void *exitstat; … | |
can you please tell me how rand () is implemented ? i know it is library implementaion dependent. but still can you tell me the way in which it is mostly implemented ? i have searched on google, but didn't get anything which make me clear about my question. i … | |
I need to write a C program in the LINUX such that First Condition: from morning 8 am to evening 6 pm and also if the number of packets in the network which is being counted by the Tshark in the terminal window is greater than 500 then Switch will … | |
Hi. I need help with a program. It is a simple program where it looks for a sequence of numbers (between 1000 and 9999) where the sum of 4 sequential numbers to the 4th power = a 4 digit number comprised of those 4 original numbers. (I know... see example). … | |
i. Average sales for each staff ii. Average sales for each quarter iii. Average sales for a year iv. Total sales for each staff v. Total sales for each quarter vi. Total sales for a year The sales performance is given in Table 1. Table 1. Staff ID Quarter1 Quarter2 … | |
Make a program that will compute the eight inputted quizzes of the student where QT =q1+q2+q3+q4+q5+q6+q7+q8 divide by 8 2. Write a prgram that ask the user to enter the radius of a circle and then computer for its area where AREA = Pi x R2 3. Create a program … | |
after installing the turbo c.there is slow movement.when i m typing the result is showing after few secondswhat shal i do? please help me. | |
Hello, my name is David, and I want to create a program that will take an audio file, generate the WMP visualizations, apply some modifications, and save it to an AVI file. How can I do that? Thanks in advance (-: | |
code 1: void fun(const int **); int main() { int **p; fun(p); } code 2: void fun(const int **); int main() { const int **p; fun(p); } code 1 is compile error and 2 is not. can you explain why ? as per my knowledge, we can convert a non-const … | |
Printing the maximum numbers after user's input using Array? guys I'm struggling with this program. here's what I wrote but it's not working.. #include <iostream> #include <conio.h> using namespace std; int main() { int maxArray[10]; int maxValue=0; for(int j=0; j<4; j++) { cout<<"Enter a number: "; cin>>maxArray[j]; if(maxArray[j]>maxValue) { maxValue=maxArray[j]; … | |
I have done a VERY simple currency converter which runs in the command prompt. is it possible to some how get this to work as a windows program. I would like to be able to save it and send it to my friends. I would also like to be able … | |
| Greetings everyone, I am just starting out with C and I am stuck with a question in my book. It says the following: x=1; y=1; if(n>0) x=x+1; y=y-1; printf("%d%d"x,y); What will be the values of x and y if n assumes a value of a) 1 and b) 0. Now … |
I would liketo know how to set the number of decimal places in the below code to 2. #include <stdio.h> #include <math.h> #include <string.h> int main() { int a =2; int b =4; int c =6; int d =8; int currencyOption; printf("\n *********************************************"); printf("\n *********************************************"); printf("\n ** Enter the number … | |
va_arg (ap,int(*)()) here, ap is the va_list type variable and it is started with va_start() already. the place where i have read this said that this is wrong and you have to typedef it first , then you can extract the pointer to a function from the va_arg(). why is … | |
Hi guys, can anybody explain to me with a example why we people emphasize to pass double pointer in a function instead a single pointer when we want to fill some variable inside that function. or what are thge advantage of double pointers in c over single pointer? | |
#include<stdio.h> #define CH char*; int main(){ CH a,b; printf("%d %d\n",sizeof(a),sizeof(b)); return 0; } here the o/p is 4 1. why isnt b also of type char*..?? | |
#include<stdio.h> int main(){ float f1=14.375; float f2=14.385; if(f1==14.375) printf("Yes1\n"); else printf("No1\n"); if(f2==14.385) printf("Yes2\n"); else printf("No2\n"); return 0; } the output of this prog is Yes1 No2 but i had expected Yes1 Yes2 plz explain me the output...?? | |
#include<stdio.h> main() { int a=258; int *num=&a; printf("%d %d",*((char *)num),*((char *)num+1)); } does the output depends on little endian or big endian structure of machine on which i am running this ? thanks. | |
Hello:) Well this is my source code, but unfortunately it doesn't as it should. It should insert string s2 into s1 beggining from position p. For example if s1="green apple", s2="orange", p=3, output looks like this: greorange en aplle, and it should be in one line. I would appreciate very … | |
I need to create a program that does this v A permutation is one of several possible ways in which you can order or arrange a group of things. Write a program that displays a new random permutation of the integers 0 to 9 at the request of its user. … | |
code 1: #include<stdio.h> int main(void) { int a; a= 1,2,3; int b = a++; printf("%d",b); return 0; } code 2 : #include<stdio.h> int main(void) { int a; a= (1,2,3); int b = a++; printf("%d",b); return 0; } Can you please explain why that bracket is making ouput changed ? i … | |
| I was just writing a program for armstrong number till a given range. Something wrong with this code ? #include<stdio.h> #include<conio.h> void main() { int num,range,temp; int rem,sum=0; printf("Enter upper range: "); scanf("%d", &range); // Checking is a number is armstrong of not. printf("Armstrong are:"); for(num=10; num<=range; num++) { temp=num; … |
The End.