Pass One: Read the source code and build the symbol table. Pass Two: Read the source code again and generate the object code. Both passes do pretty much the same things; parsing, tokenizing, processing expressions, etc. The difference is that in pass one you do not know "a priori" what the type, offset, and size of objects are that you have not yet encountered, so you must do the assembly in two passes. You can assemble in one pass if you constrain the coder to define symbols before they are referenced.
Can you return multiple values from a function in C?
There are many approaches to this 'problem'. Since a C function is only allowed to return one value as the name of the function you have to provide parameters to the routine if you want multiple values to be returned.
For example, traditionally you return a value thus:
int Today () ;
if (Today() == 2) ....
int Today ()
{
/* Some logic */
return value ;
}
So if you want multiple values, send parameters to the routine that can be changed:
int Today (int * val1, int * val2, char * charValue) ;
Then, call it:
int first ;
int second ;
char third ;
if (Today (&first, &second, &third) == 2)
In this case first, second, and third can be changed inside the Today routine and return multiple values.
int Today (int * val1, int * val2, char * charValue)
{
*val1 = 5 ;
*val2 = 10 ;
*charValue = 'Y' ;
return 2 ;
}
What do you understand by complexity of sorting algorithms?
By understanding the time and space complexities of sorting algorithms, you will better understand how a particular algorithm will scale with increased data to sort.
* Bubble sort is O(N2). The number of Ops should come out <= 512 * 512 = 262144 * Quicksort is O(2N log N) on the average but can degenerate to (N2)/2 in the worst case (try the ordered data set on quicksort). Quicksort is recursive and needs a lot of stack space. * Shell sort (named for Mr. Shell) is less than O(N4/3) for this implementation. Shell sort is iterative and doesn't require much extra memory. * Merge sort is O( N log N) for all data sets, so while it is slower than the best case for quicksort, it doesn't have degenerate cases. It needs additional storage equal to the size of the input array and it is recursive so it needs stack space. * Heap sort is guaranteed to be O(N log N), doesn't degenerate like quicksort and doesn't use extra memory like mergesort, but its implementation has more operations so on average its not as good as quicksort.
What is the difference between data record and data base?
A data record is a collection of various fields of data (like name, organisation, sex, age etc), whereas a database is a collection of records tables. (And views, indexes, stored procedures, and other stuff;)
Describe the four basic data types in c?
Describe the basic data types in C
Describe the basic data types in C
Is it true or false that A linked list is a collection of nodes?
It is true that a linked list is a collection of nodes.And a node contains data part and a link part which contains address of the next node.
Why use multiple processes instead of multiple threads?
You use a process when you want a separate program, and a thread when you want to asynchronously execute some different code contained within the same program.
A process is an address space containing instructions, data, stack, etc. It represents one load module (or program) loaded into memory, ususally by the operating system's exec or equivalant call.
There can be more than one process loaded from the same load module. They are separate and distinct, even though they might share regions of instructions and constant data. As an example, the execution of ksh (in linux) or cmd (in windows) represents a process.
While executing, a process can invoke another process, either a copy of itself or a different one. For example, ksh can invoke ls, and cmd can invoke explorer. Keep in mind that this is still a different address space. In the case of linux, the process actually makes a copy of itself (fork) and then overlays itself with the new load module.
A thread, on the other hand is an execution path through a process. Every process has at least one thread, which starts with the first instruction it executes after being loaded, and ends with the call to the exit or equivalent operating system call.
So, to clarify, what executes is actually called a thread, and the process is just the address space. Different naming conventions do exist - this is the windows (and some other OS's) convention.
{Restating from three paragraphs before} While executing, a thread can load another process, either a copy of its containing process or a different one, or it can invoke a new thread within itself. While the difference might seem slight, it is not, because the (now two) threads share the same address space, and they can easily communicate with each other, assuming appropriate synchronization is used.
In the case of linux, you could say that a separate process is started as fork followed by overlay, while a new thread started as fork without the overlay.
Each thread has its own copy of its local variables, and a copy of the invoking parameters. In the simple case, that is sufficient. In the more complex case, involving explicitly allocated heap memory, either different heaps are used, or a mechanism for synchronized sharing is implemented.
How do you cope with complexity?
You have to slice down the complexity into minor complex groups, then identify two hot points:
Then work with this model for a time frame (e.g. 1 week) and at the end of the week revise the initial complexity and reconfirm the minor complex groups (or change priority for some items), and again take the new two hot points for the next week to progress.
Your complexity will disappear. This is a Project Management tecnique I use successfully.
Be aware: to look into complexity from too close will freeze you into too many details, and you will be unable to take any decision to progress successfully (in practical terms....you will be stressed without having done anything)
Sergio
What are the three parts that make up a loop structure?
ditioFor loops are a little more complex then the While loop. A for loop as 3 optional parameters. They are the initializer list, the conditional check, and the post incrementer list.
The initializer list is the section that you declare variables and/or initialize them to a specific value.
The conditional check is the conditional check for the loop to continue or finish.
The post incrementer list is a section that is used to apply post loop code. Once each iteration of the loop is complete, these lines of code are called to update variables or conditions. Then the loop runs againns. Then the loop runs again
Latest seminar topics on communication?
well there are various topics regarding seminars on communication here we can have a wide detail on networking and its security area like VPN VOIP ATM security & all besides this we can talk on aircraft borne communiction ECCm & all others well there are various topics regarding seminars on communication here we can have a wide detail on networking and its security area like VPN VOIP ATM security & all besides this we can talk on aircraft borne communiction ECCm & all others laser communication systems
What is the worst case and best case time complexity of heapsort?
The best and worst case time complexity for heapsort is O(n log n).
Write a flowchart to find the sum of maximum and minimum o N natural numbers without using arrays?
huh?
What is the use of overloading in java?
Write a shell program to generate fibnacci series using while loop?
//WAP to print fibonacci series using do-while loop.?
using System;
class Fibonacci
{
public static void Main()
{
int a=1,b=1;
int sum=0;
Console.Write("Enter Limit:");
int n=Int32.Parse(Console.ReadLine());
Console.Write(a);
Console.Write(b);
do
{
sum=a+b;
a=b;
b=sum;
Console.Write(sum);
}
while(sum<n);
}
}
By-Vivek Kumar Keshari
computer-based system(it contains both hard ware and software) that can process data that are incomplete or only partially correct
Fuzzy logic was introduced as an artificial intelligence technique, when it was realized that normal boolean logic would not suffice. When we make intelligent decisions, we cannot limit ourselves to "true" or "false" possibilities (boolean). We have decisions like "maybe" and other shades of gray. This is what is introduced with fuzzy logic: the ability to describe degrees of truth.
Example:
in fuel station if you stop a fuel injecting motor at 1.55897ltrs.it can be done with the help of fuzzy logic.fuzzy has a meaning like accurate.
What are 'on' and 'off' tags in HTML documents?
In HTML, all tags are elements and all HTML elements other than empty elements and <p> elements require a start and end tag to delimit the element's content. The <br> tag is an example of an empty element (there is no </br> tag). However, an empty element can also be closed by the start tag, such that <br /> is acceptable (<br /> is a requirement of XHTML but not HTML).
Does computer programming have its own degree or do you need to major in computer science?
There are Associated Degree (U.S.A.) and Professional Certification available for Computer programming. But you don't need to have one to be a programmer, and have any of those (AA degree or certification) does not mean that you can or should program, either!!
Computer Science major is NOT the only way to learn computer programming. There should be courses available for non-computer science majors.
How you can find a factorial of a number without using multiple operator?
If you really wanted to do this, you could simulate multiplication with repeated addition.
To find Armstrong number in java?
/*Program to find whether given no. is Armstrong or not. Example : Input - 153 Output - 1^3 + 5^3 + 3^3 = 153, so it is Armstrong no. */ class Armstrong{ public static void main(String args[]){ int num = Integer.parseInt(args[0]); int n = num; //use to check at last time int check=0,remainder; while(num > 0){ remainder = num % 10; check = check + (int)Math.pow(remainder,3); num = num / 10; } if(check == n) System.out.println(n+" is an Armstrong Number"); else System.out.println(n+" is not a Armstrong Number"); } }
False. OO programs are usually slightly bigger and slower than 'standard' programs.
What is an escape character in Java?
The escape character, the back slash: \, is the character that signals the following character is not what it normally means, i.e. as a reserved symbol, or as a new symbol.
The uses of the escape character include:
In Strings when " or ' is a required part of the string
String example1 = "She said,"Hello""; //the escape sequence signifies the " is actually //a " not the end of the String literal.
In Formatting Strings
\n means new line
\t means tab
i.e.
System.out.println("Hello\nHow are you?\tFine thank you.");
// Prints
// Hello
// How are you? [tab] Fine thank you.
And of course the really idiosyncratic one:
When the back slash is essential to a string, and you don't want it to be a escape character:
\\ means \
i.e.
System.out.println("\");
// Prints \
Can return statement be in a void method in java?
the main method in java is the client code therefore doesn't return any values Unlike languages like C/C++, the user doesn't specify an error return code by returning from the main method. Instead they should use System.exit(code) to do this. If the Java main method returns, the default code of zero is returned.
They are basically words or simbles written out to make a program. Here is a simple one if you want to make one open a website
1 open notepad by doing Start>all programs>accessories>notepad
2 paste this in
@echo off
cls
title Website opener
color 4b
Set /p website= Type The website you would like to goto
echo Opening %website%
start www.%website%.com
exit
3 goto file save as whatever.bat
4 bellow that select All files instead of txt document.
5 open and enjoy
You will need an internet connection