15,551 Topics

Member Avatar for
Member Avatar for gazzy1

I WANT THIS BUT I CAN NOT UNDER STAND PLZ HELP WHAT CHANGES I SHOUL DO HERE I WANT TO MAKE quick estimation by taking the temperature in Celsius, double it and add 32 AND WANT TO Write a program that takes temperature in Celsius; convert it to Fahrenheit both …

Member Avatar for deben.salemme
0
139
Member Avatar for dooboosjsdjs

A coffee shop offers a range of drinks * Tea - $1.00 * Coffee - $1.50 * Hot Chocolate - $2.00 * Chai Latte - $1.75 * Flat White - $2.20 You will need to create a program that keeps track of the total spent after each order. * At …

Member Avatar for Delnith
0
153
Member Avatar for Delnith

how do I set visual studio to read my C code by default instead of C# or whatever its doing?

Member Avatar for Delnith
0
99
Member Avatar for mathews123

Hi there i am wondering if there is easy way of writing the following problem in C:- For everytime constant A increases, constant B should decrease by 10 until A is equals to 120 !! Thanks in advance guys I dont really want to clutter my project with tons of …

Member Avatar for deceptikon
0
176
Member Avatar for mangalasadu

#include<stdio.h> #include<math.h> int main() { int num,i,count0=0,count1=0; printf("enter number \n"); scanf("%d",&num); for(i=0;i<32;i++) { if(num &((pow(2,31))>>i)) count1++; else count0++; } printf(" the no. of 0's and 1's in the given number are %d %d",count0,count1); }

Member Avatar for Learningvinit
0
206
Member Avatar for chandan127

#include<stdio.h> #include<string.h> typedef struct { char name[20]; long int ptn; float lt; }census; int main() { int i,n; census city[10]; printf("How many cities\n"); scanf("%d",&n); for(i=0;i<n;i++) { census city[10]; printf("Name:"); gets(city[i].name); printf("\nPopulation:"); scanf("%ld",&city[i].ptn); printf("\nlteracy:"); scanf("%f",&city[i].lt); } }

Member Avatar for Gonbe
0
78
Member Avatar for rithish

hii deceptiokn my question is we know we can implement a bubble sort in an array.Is it possible to implement bubble sort in circular doubly linked list?????

Member Avatar for Ancient Dragon
0
469
Member Avatar for mickael.reinman

I have been pondering this task for awhile now and I just can't get it to work. I am trying to get the function readParameters to read the text from a .txt file and transfer them to the specified variables. I have managed to eliminate almost all the warnings but …

Member Avatar for mickael.reinman
0
4K
Member Avatar for Learningvinit

#include <stdio.h> #include <stdlib.h> #include <string.h> main() { char *p1="Name"; const char *p2="Name"; char const *p3="Name"; char *const p4="Name"; const char *const p5="Name"; ++p1; ++*p1; ++p2; ++*p2; ++p3; ++*p3; ++p4; ++*p4; ++p5; ++*p5; } While Compiling above code certain Compilation error came. The errors are: const.c: In function âmainâ: const.c:17: …

Member Avatar for nitin1
0
538
Member Avatar for Nomi55

#include <stdio.h> main() { char a[4][4]; int row,col; for (row=0;row<4;row=row+2) { for (col=0;col<4;col++) { if ((row==col)||(row!=col)) { a[row][col]='x'; } } } for (row=0;row<4;row=row+2) { for (col=0;col<4;col++) { printf ("%c",a[row][col); } } }

Member Avatar for Gonbe
0
169
Member Avatar for tanvir.firuz

i want to know the code in C language when i will compile the program the character will delay printing in the display. Please help. thanks.

Member Avatar for Gonbe
0
128
Member Avatar for tejaes

sir i want a program on....uart(init,shutdown,tx(pin1:1000,pin2:1001),rx(pin1:2000,pin2L:2001) using c

Member Avatar for deceptikon
0
23
Member Avatar for sandy.phan.37

Hi everyone, I'm currently working on a school assignment and came up with this error saying 'list_t has no member named head' but when I actually look at list.h and list.c (my code accessing list is in a separate file), head is in list.c. What did I do wrong? list.c …

Member Avatar for deceptikon
0
8K
Member Avatar for arjun.kancharla23

**Hi can anyone help me with the C code for calculating time difference between two keyboard key hits????**

Member Avatar for Gonbe
0
531
Member Avatar for Icekilla

Well, I need to code a pyramid that prints the following pyramid WITHOUT the stars *********1 ********232 *******34543 ******4567654 *****567898765 ****67890109876 ***7890123210987 **890123454321098 *90123456765432109 0123456789876543210 In the center, there are prime numbers, from 1 to 9, and after that, they cycle. (1,3,5,7,9,1,3,5,7,9 and so on). I made the code for …

Member Avatar for deceptikon
0
263
Member Avatar for ownedbynothing

I do have 2 structures here. main linked list is the word. each node of the word list do have a meaning typedef struct node{ char word[20]; struct node2 *meaning; struct node *next; }word; typedef struct node2{ char meaning[100]; struct node2 *next; }means; My problem now is I can't add …

Member Avatar for Gonbe
0
1K
Member Avatar for idlackage

I have this: typedef struct { int value; } Thing; void doSomething(Thing *ptr) { ptr = (Thing *)calloc(5, sizeof(Thing)); int i; for(i = 0; i < 5; i++) { scanf("%d", (ptr[i]).value); } } int main() { Thing t; doSomething(&t); } Which crashes at the scanf() line. How should I be …

Member Avatar for rubberman
0
215
Member Avatar for goyofoyo

In Xcode how does one create a header file? and what should it include? or does xcode create the file and use the information from the .c file to create the .h file

Member Avatar for rubberman
1
187
Member Avatar for Delnith

I am looking to code a small program in which the pandora songs I listen to are placed into a text file with the title and artist. I have no clue where to go as starting this project and would appreicate any and all help. I have mid level knowledge …

Member Avatar for Delnith
0
324
Member Avatar for sangi1981

Hi all, I implemented a C program using my mac book. Now, my client wants to migrate to windows OS (MinGW). Program does many calculation using long double: on mac it works fine, otherwise on winz doesn't. I read on internet the problem is that long double type is supposed …

Member Avatar for sangi1981
0
304
Member Avatar for DavdPrez

well I've this little homework. "Given a text file, create a function that search an specific ID provided by the user inside the file, If exits, print the entire profile as follow: ID_genre_name_age_height" So In the text file there is only one profile. 19800372_male_David_19_1.75 so, my function should print that …

Member Avatar for DavdPrez
0
2K
Member Avatar for somjit{}

**the code works perfectly, just i got something i dont understand...** i'v been trying to get a hold of recursion and sorting for about 3-4 days now, im getting some of it, but still not happy enough.. i searched for some good code for binary search and merge sort on …

Member Avatar for somjit{}
0
428
Member Avatar for nitin1

int main() { int i=5; printf("%u",&i); return 0; } will the address which it will print is physical address of that variable or logical address ? I may not be clear in the defination of physical and logical address. thanks if you can help me ;)

Member Avatar for deceptikon
0
102
Member Avatar for nitin1

Can anyone exactly tell that how do we decide the complexity in this case. like nlogn +n , then the overall complexity is ? like, if O(f(n)+g(n)) can be equal to max(f(n),g(n)) ? Can we say this ? thanks

Member Avatar for deceptikon
0
38
Member Avatar for shanki himanshu
Member Avatar for rithish
0
84
Member Avatar for revelator

Can anyone help me with giving me an idea how to make a basic Car Rental Application using Switch, for, if loop in C language. Help will be appreciated. I am newbie and i have been given this problem to solve. pLz Help

Member Avatar for revelator
0
167
Member Avatar for goyofoyo
Member Avatar for goyofoyo
0
66
Member Avatar for nitin1

#include<stdio.h> int dp[20]; int lis(int a[],int n) { int i,j,sum=0; dp[0]=1; for(i=0;i<6;i++) { for(j=i+1;j<n;j++) { if(a[j]>=a[i]) { dp[j]=dp[j-1]+1; } else dp[j]=dp[j-1]; } } } int main() { int a[]={ 5, 3, 4, 8, 6, 7}; int i=0; lis(a,6); for(i=0;i<6;i++) printf("%d ",dp[i]); getch(); return 0; } hi , this is the …

Member Avatar for nitin1
0
256
Member Avatar for c_program_user

I am trying to create a C struct with a member that points to a 2d array. The compiler generates error messages, and I am unable to find out the root cause. I am basically trying to access a struct member to obtain the value of an element in a …

Member Avatar for marathe19
0
118
Member Avatar for mozala

I have a problem with search function by name ,could anyone help me? This my code so far!! Thanks in advance. [CODE] #include <iostream> #include <fstream> #include <iomanip> #include <cstdlib> #include <string> using namespace std; class phonebook { public : phonebook() : MobilNumber(0), lastName(""), firstName(""), pcode(0),Email(""),city(""),Street("") { } void setMobilNumber( …

Member Avatar for Ajexa
0
565

The End.