What is the code for sizeof() function/operator?
912485
there is no "code" for it. The compiler evaluates it at the compile time, and replaces with the actual number.\nThere is no way to write a function that would did that at run time, because at run time, there is not type information available - only addresses of variables not their sizes
881644
Something like this:\n\nint **myArray;\nint s1,s2,i;\n\nprintf("Input row size: ");\nscanf("%d",&s1);\nprintf("Input column size: ");\nscanf("%d",&s2);\n\nmyArray[0] = malloc(s1*s2*sizeof(int));\nif (myArray[0] != NULL ) {\n  for (i = 0;i<s1,i++) {\n         myArray[i] = (i * s2) + myArray[0];\n  }\n}\n\nmyArray can then be used as normal\n\nmyArray[2][4] = 20;
161686
Easy if you restrict to integer types.\n\nCreate the following macro:\n\n#define IS_SIGNED(type) (((type) 0xFFFFFFFF) < 0)\n\nYou can now use it direction in your code as such:\n\nif (IS_SIGNED (char))\n{\n   stuff if it is signed\n}\nelse\n{\n   stuff if it is unsigned\n}\n\nNote that this implementation assumes that you maximum integer type is 32 bits. Pretty easy to change if it is otherwise though.\n\nI have done a LOT of multiple-platform code, char signing and byte ordering are the two biggest headaches.\n\nHope this helps.
522101
void RemoveWhiteSpaces(char *string) {\nchar * bch;\nchar newstr[80];\n// Get the first whitespace\nbch = strtok (string,' ');\n\nwhile (*bch != '&#92;0')\n{\n  if(string != ' ') {\n   strcat(newstr,bch);\n  }\n  *bch++;\n}\n\nreturn 0;\n}\n\n\nI guess, I am not gonna give you the hwole answer, maybe I did :) But here it is, hope you the best.. Some stuff need work
328657
well, it seems the umlaut (the one in this question) is working well. Maybe you don't have the appropriate Character encoding installed. \n\nTry View > Encoding > Unicode (any kind of unicode, try one by one, also known as UTF-x, with x being the charbit length length).
195727
Here is one way of doing it, using only what we've seen so far: \n\n#include <stdio.h>\n\nextern int getline(char [], int);\nextern int reverse(char [], int);\n\nint main()\n{\nchar line[100];\nint len;\n\nwhile((len = getline(line, 100)) != EOF)\n{\nreverse(line, len);\nprintf("%s&#92;n", line);\n}\n\nreturn 0;\n}\n\nint reverse(char string[], int len)\n{\nint i;\nchar tmp;\nfor(i = 0; i < len / 2; i = i + 1)\n{\ntmp = string[i];\nstring[i] = string[len - i - 1];\nstring[len - i - 1] = tmp;\n}\nreturn 0;\n}\n\nIn practice, it would be a nuisance to have to pass the length of the string to the reverse function. Strings in C are always terminated by the ``zero'' or ``nul'' character, represented by &#92;0. Therefore, reverse (or any piece of code) can always compute the length of a string, either by searching for the &#92;0, or by calling the library function strlen, which computes the length of a string by searching for the &#92;0. Here is how the program might look if the reverse function did not require that the length of the string be passed in: \n#include <stdio.h>\n#include <string.h>\n\nextern int getline(char [], int);\nextern int reverse(char []);\n\nint main()\n{\nchar line[100];\n\nwhile(getline(line, 100) != EOF)\n{\nreverse(line);\nprintf("%s&#92;n", line);\n}\n\nreturn 0;\n}\n\nint reverse(char string[])\n{\nint len = strlen(string);\nint i;\nchar tmp;\nfor(i = 0; i < len / 2; i = i + 1)\n{\ntmp = string[i];\nstring[i] = string[len - i - 1];\nstring[len - i - 1] = tmp;\n}\nreturn 0;\n}
253284
#include <stdio.h>\n\nint main(void) {\n\nint i, j, count; //C Sucks, wait till you take java\n\nfor(i=1; i<=1000; i++){&#92;&#92;goes through all numbers 1 to 1000\n    count=0;\n    for(j=2; j<i; j++)&#92;&#92;goes through all numbers 2 to i\n    {\n     if(i%j==0)&#92;&#92;checks to see if it i is evenly div. by i\n        count++;\n    }//nested for\n    if (count ==0)\n        printf("%d&#92;n", i);\n}//for\n\nreturn 0;\n}//main\n\n\n//Hope that helps!
1050475
i see from the code u entered ./n .............\nin c++ that MATLAB is based and devloped from it it work but try this\n\ntry:-\n-n= (newline): specifies end of line characters (equivalent to '&#92;n').
600562
Okay once again..\nStringBuffer b = buf.replace(6,10,"orld");\n\nThis replaces offset 6 to 10 with world... So offset 6 in your case is W so it would be:\nHello orld\n\nNow That is correct.. Now b.delete(0, 1)\nThat deletes the 0 offset which is H! only so it would be\nello\n\nNow the total StringBuffer Contents is:\nello orld\n\n\nSee why? Remember buffers is like a memory location that stores a buffer, so treat it as global scope in that case
532980
I'm sorry but did you see this in My_Computer properties?\n\n\n\n--- ► λ ◄ \n\nN.B. I'm still a learner.
720836
i'm not sure why or what is the error exactly,\nbut why don't u try to retrieve the hight or width using the get functions:\n\nint width = this.getWidth();\nint hight = this.gethight();\n\ni think this would do the job, and u'd be able to retrieve the data u want.\n\ngood luck ;)
238393
I will Answer On A Sample :\n\n    Delegate Function fns_Operation(ByVal par1 As Double, ByVal par2 As Double) As Double\n\n    Function fns_01(ByVal par1 As Double, ByVal par2 As Double) As Double\n        Return par1 + par2\n    End Function\n\n    Function fns_02(ByVal par1 As Double, ByVal par2 As Double) As Double\n        Return par1 * par2\n    End Function\n\n    Function fns_Operate(ByVal par1 As Double, ByVal par2 As Double, ByVal fns As fns_Operation) As Double\n        Return fns(par1, par2)\n    End Function\n\n    Sub Test()\n        MsgBox(fns_Operate(123, 343, AddressOf fns_01))\n        MsgBox(fns_Operate(3453, 24234, AddressOf fns_02))\n    End Sub
440005
Pseudocode, I'm not up on my Java syntax:\n\nint sum=0;\nfor(int i=0;i<array.size;i++)\n  sum+=array[i];
830076
you can't really "catch" them per se, as they are really not errors, unlike floating point overflows. \nYou can do some sanity checks like the above answer explained...\nor better, just use larger storage - like unsigned long long - that'll give you more space without overflowing.
461539
printf("%-15u&#92;n",40000);\n\nprovided I understood it correctly.
382095
java usees wrapper classes...Byte,Integer..they are in java.lang package..\n\nin each such class there is one memeber \nstatic int SIZE\n\nusing that u can find out..\n\neg.System.out.println(Byte.SIZE);\n//The number of bits used to represent a byte value in two's complement binary form\n\nSIMILARITY FOR OTHER DATA TYPES..\n\ncheck out documentation site..or if u have already downloaded doc..then use that..
58358
Use sprintf(), it allows you to "print" into an array.\n\nint x = 123;\nchar temp[10];\nsprintf(temp, "%d", x); // temp will contain "123"\n\nJust make sure that buffer is large enough to hold all the digits of your largest number + 1 for the null terminator.