write a program to generate address labels using structures?
Answer / Sandeep Dixit
Here is a simple example of a C program that generates address labels using structures:
```c
#include <stdio.h>
struct Address {
char street[50];
int house_number;
char city[20];
char state[10];
char zip[10];
};
void printLabel(struct Address address) {
printf("----------------------------------n");
printf("| %s, %dn", address.street, address.house_number);
printf("| %s, %s %sn", address.city, address.state, address.zip);
printf("----------------------------------n");
}
int main() {
struct Address myAddress = {"123 Main Street", 1234, "Cityville", "NY", "12345"};
printLabel(myAddress);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program to gat the digt sum of a number (et. 15= >1+5=6)
what is the different between if-else and switch statment (other than syntax)
26 Answers CTS, Oracle, Scorpos,
what is a function method?give example?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
All technical questions
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);
How to declare a variable?
Write a programe print the sum of series 0,1,2,.....10
i want explaination about the program and its stack reprasetaion fibbo(int n) { if(n==1 or n==0) return n; else return fibbo(n-1)+fibbo(n-2); } main() { fibbo(6); }
What is sizeof return in c?
What is indirection in c?
Function calling procedures? and their differences? Why should one go for Call by Reference?