:: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
 Categories >> Code Snippets
  Programming Code (799)   Scripts_Markup Code (195)
Suggest New Category 


Question Asked @ Answers Views     Select
There 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(; } }    1  1403
main() { 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.month, &student.dob.year); }    1  3484
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &, &student.dob.month, &student.dob.year); }    1  1332
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?    1  1015
#include main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr    1  1403
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); } csc   4  6753
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }    1  1731
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }    1  2654
main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }    2  2270
main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }    1  3541
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); } csc   2  3404
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }    1  2230
main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }    1  1316
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }    6  3266
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }    1  1274
E-Mail New Answers        Answer Selected Questions       
Prev    1   ... 6   ... 11   ... 16   ... 21   ... 26    32   [33]    34  ... 41   ... 46   ... 51   ... 56   ... 61   ... 66    Next
Un-Answered Questions
 Question Views   Select
Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37 832
<ul> <li id="Accommodation" runat="server" visible="false"><a href="../Elements/frmSearchAccommodation.aspx?submenuheader=1">Accommodation</a></li> <li id="Arts" runat="server" visible="false"><a href="../Elements/frmSearchProp.aspx?submenuheader=1">Arts And Props</a></li> <li id="Costume" runat="server" visible="false"><a href="../Elements/frmSearchCostume.aspx?submenuheader=1">Costume</a></li> <li id="Crew" runat="server" visible="false"><a href="../Elements/frmSearchCrew.aspx?submenuheader=1">Crew</a></li> <li id="Catering" runat="server" visible="false"><a href="../Elements/frmSearchCatering.aspx?submenuheader=1">Catering</a></li> <li id="Equipment" runat="server" visible="false"><a href="../Elements/frmSearchEquipment.aspx?submenuheader=1">Equipment</a></li> <li id="Film" runat="server" visible="false"><a href="../Elements/frmSearchFilmTapeStock.aspx?submenuheader=1">Film And Tape Stocks</a></li> <li id="Location" runat="server" visible="false"><a href="../Elements/frmSearchLocation.aspx?submenuheader=1">Location</a></li> <li id="Picture" runat="server" visible="false"><a href="../Elements/frmSearchPictureVehicle.aspx?submenuheader=1">Picture Vehicles</a></li> <li id="Production" runat="server" visible="false"><a href="../Elements/frmSearchProductionSupplies.aspx?submenuheader=1">Production Supplies</a></li> <li id="Post" runat="server" visible="false"><a href="../Elements/frmSearchPostProductionHouse.aspx?submenuheader=1">Post Production Houses</a></li> <li id="Rigging" runat="server" visible="false"><a href="../Elements/frmSearchRigging.aspx?submenuheader=1">Rigging</a></li> <li id="Stunt" runat="server" visible="false"><a href="../Elements/frmSearchStunt.aspx?submenuheader=1">Stunt</a></li> <li id="Studio" runat="server" visible="false"><a href="../Elements/frmSearchStudio.aspx?submenuheader=1">Studio</a></li> <li id="SFX" runat="server" visible="false"><a href="../Elements/frmSearchSFX.aspx?submenuheader=1">SFX</a></li> <li id="Talents" runat="server" visible="false"><a href="../Elements/frmSearchTalent.aspx?submenuheader=1">Talents</a></li> <li id="Transport" runat="server" visible="false"><a href="../Elements/frmSearchTransport.aspx?submenuheader=1">Transport</a></li> <li id="Venue" runat="server" visible="false"><a href="../Elements/frmSearchVenue.aspx?submenuheader=1">Venue</a></li> <li id="Other" runat="server" visible="false"><a href="../PageUnderConstruction.aspx?submenuheader=1">Other</a></li> </ul> I have this code in leftmenu.ascx on leftmenu.ascx.cs page i want to access id values. but i dont want to check manually like Accommodation,Arts etc.. In cs file my code is like string str[]; //this array contains some values say 10 strings for(i=0;i<100;i++) { if(str[i]==id id.visible=true } i.e.i want to travel for each element of str and each value of id.if they match then id.visible=true how to do? 2003
can any one give me code to keyed a flat file and used chain in RPGLE to search any item 592
Write a function that takes as input a binary tree, and prints out each level of the tree on a newline. For example: a / b c / / d e f will output: a b c d e f 103
How to access oralce10g data from server to client in LAN? 937
Hi, I want the code to fetch multiple rows in REXX using RLX and CURSOR. Can anyone help me? 956
Write Down Steps Using SAX Parser 955
What is the best way to make wordpress plugin 1426
What is Generic" J2ME architecture? 309
Discuss an algorithm to traverse a tree, depth first. 93
how to diplay a external image of output on winxp by using c & c++, 1508
how to create a Draggable element 736
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange 1281
import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzz xplain me this java code like why i m including this packages n the whole code plzzzzzz 595
How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain. 318
E-Mail New Answers        Answer Selected Questions