:: 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 (810)   Scripts_Markup Code (196)
Suggest New Category 


Question Asked @ Answers Views     Select
Is the following code legal? typedef struct a { int x; aType *b; }aType    1  1790
Is the following code legal? struct a { int x; struct a *b; }    2  1639
Is the following code legal? struct a { int x; struct a b; }    1  1705
#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  4193
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }    2  2329
What is the hidden bug with the following statement? assert(val++ != 0);    1  2547
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }    1  1723
What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++    1  1876
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])    1  2752
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  1648
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  3889
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  1510
Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?    1  1179
#include main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr    1  1663
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); } csc   4  7810
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
Hello I am hosting remoting within IIS. Everything works just fine as long as I allow anonymous access at the IIS level. When I allow only Windows Authenticated sessions, something very strange happens: If the client activates the remote object with IP address - works fine If the client activates it using a machine name - get http 401 exception is thrown. The exception is thrown when the client calls the remote method. I set the channel's useDefaultCredentials property to true. Any idea how to allow Windows Authentication? Here is the call stack: System.Net.WebException: The remote server returned an error: (401) Unauthorized .. ---> System.ComponentModel.Win32Exception: The target principal name is incorrect at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean handshakeComplete) at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob, Boolean handshakeComplete) at System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate) at System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate) at System.Net.NegotiateClient.Authenticate(String challenge, WebRequest webRequest, ICredentials credentials) at System.Net.AuthenticationManager.Authenticate(String challenge, WebRequest request, ICredentials credentials) at System.Net.AuthenticationState.AttemptAuthenticate (HttpWebRequest httpWebRequest, ICredentials authInfo) --- End of inner exception stack trace --- 2731
what are the other loops except for for,while,do while and until? 1039
1.Why does only one copy of a servlet object get created? What happens if you want to remove an old servlet object currently running but do not want to stop the entire servlet engine? 2.How does one servlet object deal with interactions from many browser? (e.g. if your servlet ran an email site, how can it keep track of hundreds of users logging in, reading their mail, etc.) 1385
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ? 2249
How to store the iterations value in some variable/ in excel? Dim objExcel, ObjFolder, objPath, objWorkbook, objSheet, ObjFSo, ObjFolderName, strExcelPath Const xlExcel7 = 39 ObjFolderName = "Testing" & Hour(time()) & Minute(time()) &Second(time()) objPath = "D:\" strExcelPath = objPath & ObjFolderName & "\testing.xls" Set ObjFSo = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.CreateFolder(objPath & ObjFolderName) On Error Resume Next Set objExcel = CreateObject("Excel.Application") If (Err.Number <> 0) Then On Error GoTo 0 Wscript.Echo "Excel application not found." Wscript.Quit End If On Error GoTo 0 Set objWorkbook = objExcel.Workbooks.Add() Set objSheet = objExcel.ActiveWorkbook.Worksheets(1) Dim arr1, arr2, arr3 Set outputLines = CreateObject ("System.Collections.ArrayList") arr1 = 123arr2 = 99 arr3 = 10 outputLines.Add arr1 outputLines.Add arr2 outputLines.Add arr3 outputLines.Sort() For Each outputLine in outputLines WScript.Echo outputLine ' how to store this value in excel/ variable? Next objExcel.ActiveWorkbook.SaveAs strExcelPath, xlExcel7 objExcel.ActiveWorkbook.Close objExcel.Application.Quit This above code is working fine but the qs is is there any way to store the sort data in variables / in the excel and how? 1490
In LSMW , what does the following error mean and how to rectify it : Incorrect interface data for set 78 in method C . This error is occuring in idoc processing step of LSMW. 1268
can we pass variable in array to traverse it? 1028
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ?? 359
How can manage theme in php? 978
Write a function that takes an unsorted integer array, and returns a three element subset whose sum is zero. 289
I am attempting to work on a game panel with multi-server support, so in one of the pages there is a dropdown menu with servers on it, this is the part i am having issues with is server 1 is chosen i need access to the username running a script to server 1 chosen i need a script that will realize its been chosen and pop up below with a username thats associated with it because the users differ on each server so i choose server 1 i need a code to pull from the db and choose the user associated with the said server please help.. 1169
write a program that reads a series of strings and prints only those strings begging with letter "b" 978
Write a program to model an exploding firecracker in the xy plane using a particle system 2293
Code for Adding Scripting Support to an Application? 1057
Write a simple encryption program using string function which apply the substitution method. 3293
E-Mail New Answers        Answer Selected Questions