< 1 2 3 4 5 6 7 > >>   Sort: Rank

How To Retrieve Input Values for Checkboxes Properly
How To Retrieve Input Values for Checkboxes Properly? - PHP Script Tips - Processing Web Forms If multiple input values are submitted with the same field name, like the case of a group of checkboxes, you should add ([]) to the end of the field name. This tells the PHP engine that multiple values are...
2016-06-26, 12256👍, 1💬

💬 2016-06-26 Donald: Thanks.

Java String Interview Question
If we have the following in a Java code: String s="abc"; String s2="abc"; Then what will be output of: System.out.println("s.equals(s 2)= "+s.equals(s2)); System.out.println("s==s2 = "+(s==s2)); The correct answer is: s.equals(s2) = true s==s2 = true The following answer is wrong. Because both liter...
2016-06-26, 13373👍, 2💬

💬 2011-01-25 FYIcenter.com: Hi Kevin, Thanks. Answer updated.

💬 2011-01-17 Kevin McLain: This answer is wrong! String literals are interned by the VM this both will print true

About interview.FYIcenter.com
interview.FYIcenter.com offers a collections of interview questions and answers for software and Web developers.
2016-06-25, 9897👍, 0💬

Creating a New Thread
How to create a thread in a program? You have two ways to do so. First, making your class "extends" Thread class. Second, making your class "implements" Runnable interface. Put jobs in a run() method and call start() method to start the thread.
2016-06-25, 433362👍, 8💬

💬 2016-06-25 Ron: You can also create an anonymous class and run it: Thread t = new Thread() { public void run() { // do whatever you want } }; t....

💬 2013-10-02 drinkin: This unmistakably created an audience for books fact that consciously offered the grand design models

💬 2013-07-23 XRumerTest: Hello. And Bye.

(More comments ...)

How many JSP scripting elements and what are they?
How many JSP scripting elements and what are they? There are three scripting language elements: --declarations --scriptlets --expressions
2016-06-25, 3377👍, 1💬

💬 2016-06-25 saidesh: Jsp scripting elements are three types: Declaration, Expression, Scriptlet.

What Are the Differences between CHAR and NCHAR
What Are the Differences between CHAR and NCHAR? - Oracle DBA FAQ - Understanding SQL Basics Both CHAR and NCHAR are fixed length character data types. But they have the following differences: CHAR's size is specified in bytes by default. NCHAR's size is specified in characters by default. A charact...
2016-06-25, 5477👍, 0💬

In a call to malloc, what does an error like
In a call to malloc, what does an error like ``Cannot convert `void *' to `int *''' mean? It means you're using a C++ compiler instead of a C compiler.
2016-06-21, 1596👍, 0💬

I see code like ...
I see code like char *p = malloc(strlen(s) + 1); strcpy(p, s); Shouldn't that be malloc((strlen(s) + 1) * sizeof(char))? It's never necessary to multiply by sizeof(char), since sizeof(char) is, by definition, exactly 1. (On the other hand, multiplying by sizeof(char) doesn't hurt, and in some circum...
2016-06-21, 1430👍, 0💬

I wrote a little wrapper around malloc ...
I wrote a little wrapper around malloc, but it doesn't work: #include lt;stdio.h> #include lt;stdlib.h> mymalloc(void *retp, size_t size) { retp = malloc(size); if(retp == NULL) { fprintf(stderr, "out of memory\n"); exit(EXIT_FAILURE); } } Are you sure the function initialized what you thought it di...
2016-06-10, 1468👍, 0💬

I im trying to declare a pointer and allocate some space for it
I'm trying to declare a pointer and allocate some space for it, but it's not working. What's wrong with this code? char *p; *p = malloc(10); The pointer you declared is p, not *p. When you're manipulating the pointer itself (for example when you're setting it to make it point somewhere), you just us...
2016-06-10, 1616👍, 0💬

How can I shut off the warning: possible pointer alignment problem ...
How can I shut off the ``warning: possible pointer alignment problem'' message which lint gives me for each call to malloc? A modern lint shouldn't be complaining about this. Once upon a time, lint did not and could not know that malloc ``returns a pointer to space suitably aligned for storage of an...
2016-06-03, 1289👍, 0💬

How can I dynamically allocate arrays?
How can I dynamically allocate arrays? The equivalence between arrays and pointers allows a pointer to malloc'ed memory to simulate an array quite effectively. After executing #include &lt;stdlib.h> int *dynarray; dynarray = malloc(10 * sizeof(int)); (and if the call to malloc succeeds), you can...
2016-04-23, 1405👍, 0💬

How can I find out how much memory is available?
How can I find out how much memory is available? Your operating system may provide a routine which returns this information, but it's quite system-dependent. (Also, the number may vary over time.) If you're trying to predict whether you'll be able to allocate a certain amount of memory, just try it-...
2016-04-23, 1473👍, 0💬

Return a null pointer or a pointer to 0 bytes? .....
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes? The ANSI/ISO Standard says that it may do either; the behavior is implementation-defined ortable code must either take care not to call malloc(0), or be prepared for the possibility of a null return.
2016-04-21, 1317👍, 0💬

I have heard that some operating systems dont actually allocate...
I've heard that some operating systems don't actually allocate malloc'ed memory until the program tries to use it. Is this legal? It's hard to say. The Standard doesn't say that systems can act this way, but it doesn't explicitly say that they can't, either. (Such a ``deferred failure'' implementati...
2016-04-21, 1327👍, 0💬

malloc is returning crazy pointer values ...
malloc is returning crazy pointer values, I have included the line extern void *malloc(); before I call it. malloc accepts an argument of type size_t, and size_t may be defined as unsigned long. If you are passing ints (or even unsigned ints), malloc may be receiving garbage (or similarly if you are...
2016-04-15, 1374👍, 0💬

I am allocating a large array for some numeric work ...
I'm allocating a large array for some numeric work, using the line double *array = malloc(300 * 300 * sizeof(double)); malloc isn't returning null, but the program is acting strangely, as if it's overwriting memory, or malloc isn't allocating as much as I asked for, or something.. Notice that 300 x ...
2016-04-15, 995👍, 0💬

Why can I only seem to malloc 640K or so?. .....
I've got 8 meg of memory in my PC. Why can I only seem to malloc 640K or so?. Under the segmented architecture of PC compatibles, it can be difficult to use more than 640K with any degree of transparency, especially under MS-DOS.
2016-04-12, 971👍, 0💬

My application depends heavily on dynamic allocation of nodes for data structures ......
My application depends heavily on dynamic allocation of nodes for data structures, and malloc/free overhead is becoming a bottleneck. What can I do ? One improvement, which is particularly attractive if all nodes are the same size, is to place unused nodes on your own free list, rather than actually...
2016-04-12, 1114👍, 0💬

y program is crashing, apparently somewhere down inside malloc ....
My program is crashing, apparently somewhere down inside malloc, but I can't see anything wrong with it. Is there a bug in malloc? It is unfortunately very easy to corrupt malloc's internal data structures, and the resulting problems can be stubborn. The most common source of problems is writing mor...
2016-04-06, 917👍, 0💬

I im dynamically allocating an array, like this ...
I'm dynamically allocating an array, like this: int *iarray = (int *)malloc(nints); malloc isn't returning NULL, but the code isn't working. A:malloc is a low-level, typeless allocator. It doesn't know how you're going to use the memory; all it does is to allocate as many bytes of memory as you ask ...
2016-04-06, 1020👍, 0💬

You cant use dynamically-allocated memory after you free it?
You cant use dynamically-allocated memory after you free it? No. Some early documentation for malloc stated that the contents of freed memory were ``left undisturbed,'' but this ill-advised guarantee was never universal and is not required by the C Standard. Few programmers would use the contents of...
2016-04-04, 953👍, 0💬

Why isn't a pointer null after calling free? ...
Why isn't a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it's been freed? When you call free, the memory pointed to by the passed pointer is freed, but the value of the pointer in the caller probably remains unchanged, because C's pass-by-value sem...
2016-04-04, 857👍, 0💬

When I call malloc to allocate memory for a pointer which is local to a function ....
When I call malloc to allocate memory for a pointer which is local to a function, do I have to explicitly free it? Yes. Remember that a pointer is different from what it points to. Local variablesare deallocated when the function returns, but in the case of a pointer variable, this means that the po...
2016-03-31, 923👍, 0💬

< 1 2 3 4 5 6 7 > >>   Sort: Rank