Relationship between transfer function and homogeneous solution
How to reverse a linked list without usinf any pointer of c?
How to check whether linked list is circular?
What is the size of char pointer (in bytes)
In c++, if the pointer object characterized like a type of char ,int or float in array. So the pointer address contains the 2 bytes address.
Actually a pointer is just a address holder so its size is always that of an int data type,what ever may be the type of pointer.In a 16-bit compiler,its 2 bytes and in 32-bit compiler,its 4 bytes(ie depeds on sizeof(int))
What is the difference between user stories and a use case
Skill/topic: hash tablea) a hash number key to a keyb) key to a hash number keyc) a key to an indexexplanation: the hashstring() member function is another function called by other member functions of the hashtable class whenever a function needs to convert a key to a hash number key. The hashstring()...
C) a key to an Index
The hashString() member function is called by other member functions of the Hashtable class whenever a function needs to convert a key to hash number key.
14 is answer
ans will be 14. you can check. #include<iostream> using namespace std; int main() { int a[]={ 8, 22, 7, 9, 31, 19, 5, 13 };int counter=0; for(int i=0;i<...
What is the size of a void pointer ?
Size of void pointer or size of character pointer are same because both variable contain address or we can say memory location
all pointers are the same size, they only differ on the platform and the amount memory you are trying to address. for example, on an 8051 platform it's 3 bytes, on an intel it's 32 or 64 bits wide.
Please, can anybody answer me that when to use getinstance() and which class having getinstance(),i could not find that method in class class also.
getInstance() method is written inside a class to access the instance of the class from other class. Basically, this is used to ensure that only one instance of the particular class has been created....
The front of the stack in a stack-linked list ______________.
Skill/topic: stacks using linked lista) back of the linked listb) front of the linked listc) middle of the linked listd) none of the above
Top of stack
B) Front of the linked list i.e top
Can a linked list store data other than integers?
Skill/topic: stacks and queues: insert, delete, peek, finda) yesb) noexplanation: integers are usually used, but you can modify the data type of the data in the definition of the node to change the kind of data stored in the linked list.
When we are using structure variable then i will say yes!
Code
struct node{ int info; string name; float average; node *node; };
link list is a data structure not a property of integers...
so, the data the it store can be anything like a class object or structure object etc.
Write a program to insert a node at a given position in a single linked list?
"c NODE insert(NODE head,int data,int pos) { NODE temp,new,prev = NULL; int i=1; new = (NODE)malloc(sizeof(struct node)); new->info = data; if(head == NULL) { new->link = ...
Code
//let the structure name be stud void insert_pos(stud *head, pos) { stud s,*t; s.input(); //accept the data t=head; pos--; while(t!=NULL && pos) { t=t->next; pos--; } s->next=t->next; t->next=s; }
How to remove some keys in arraylist
Hi. this a class employee containes EId and ename are datamembers. When these employee class objects are stored in arrary list i want to remove EId containes 100 and 1000 plz replay to me
What happens if an invalid index value is passed to a function?
Skill/topic: stacks and queues: insert, delete, peek, finda) if an invalid index is passed, the function terminates without further processing. [explanation] functions that use an index value always determine if the index passed to them is valid before using the index value . If an invalid index is...
If the user passes in an invalid index, the program will cause an assertion error. While this is useful to indicate to the user that something went wrong, so they can deal with it as appropriate.
Design an iterative algorithm to traverse a binary tree represented in two dimensional matrix
A binary tree can be traversed using only one dimensional array. InOrder_TreeTraversal() { prev = null; current = root; next = null; while( current != null ) { if(prev == current.parent) { prev = cu...
Why resultset being an interface can call next()
A class which implements an interface implements its methods.When we obtain a reference to a ResultSet then we are getting an instance of a class that implements the ResultSet interface.Hence class provides concrete implementations of all of the ResultSet methods.
While creating a heterogenous linklist we know that we use void pointer. But when we need to read the information, how will you do it? How will you figure out to what datatype does the data belong to?
Some kind of information regarding the type is obviously required. If there is no way of determining it from the context (i.e., the previous node in the list somehow specifies the type), it must be st...
You have a 100-story building and a couple of marbles. You must identify thelowest floor for which a marble will break if you drop it from this floor. How fastcan you find this floor if you are given an infinite supply of marbles? What if youhave only two marbles?
Sounds like a simple binary search to me. For 100 floors, you would need at most 7 marbles to reach an answer. More generally, with n floors, you would need ceiling(Log2(n+1)) marbles. If the floors ...
1. Crisp binary choices 2. Ambiguous data 3. Decision makers 4. All of them
Fuzzy logic system relays on all Crisp binary data, ambiguous data and on decision makers.