Programming Code (840)
Scripts_Markup Code (257) Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
1 4128main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
1 5446main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
1 7687There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
1 4821Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
1 5798What is the subtle error in the following code segment?
void fun(int n, int arr[])
{
int *p=0;
int i=0;
while(i++
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
1 4801void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
2 5778#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
1 8087Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
1 5185
Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.
How can restrict user to type upto 8 characters in textbox in php?
What is the functionality of SendMessage?
Code for Two Classes for Doing Gzip in Memory?
write a program in java to find the moving average of all prime numbers between 2 and 100.
How can I create connection two blue-tooth mobile in j2me. please urgent
Write a python program to check if a number is an armstrong number?
Given a string=”me,I,myself”; .Using javascript only create an array out of this string and then send a POST request to the url “record.php” without reloading the page. The post key parameters should be n1,n2 and n3 respectively.
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?
What is xml schema?
Write a python program to check if a string is a palindrome or not?
snippet to prevent submission of form when certain/any validations got failed
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
1.What type of material can be sent from a Java servlet to a browser ? How does the browser know how to deal with the material? 2.Explain what happens to a servlet when a servlet engine is sent a GET request.
How to change winform look?