Dot Net Code (114)
Visual Basic Code (11)
Programming Code AllOther (62) Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
1 5796What 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 5184void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
1 8893char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
1 5385Which version do you prefer of the following two, 1) printf(“%s”,str); // or the more curt one 2) printf(str);
1 5846
Code for Communicating over Sockets?
output for printf("printf");
What is the functionality of GetWindow?
What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
How to swap two ASCII numbers?
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
write a program that can LOCATE and INSERT elements in array using c++ programming languages.
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n
write a program in java to solve a system of n-variabled simultaneous equations using the guassian elimination method. let the maximum possible value of n be 100. run the program using hypothetical values for a set of 10- variables simultaneous equations. print out the program, the input equation and the results generated by the program.
how to insert fname,lname,designation values into database while click on the submit button using windows authentication mode?
In java, why do we set thread priority, when we know that there is no guarantee by which a thread should be execute?
Write a program to Print the Pascal triangle
How to check if Folder is a Special Shell Folder ?
What is the functionality of GetWindowTextLength?