- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 15
- Posts with Downvotes
- 7
- Downvoting Members
- 13
the formula for naive bayes is P(A/B1,B2,B3...Bn) = [ P(A) * P(B1/A) * P(B2/A) * . . . P(Bn/A) ] / [ P(B1) * P(B2) *....P(Bn) ] i am working on a project to classify email as spam or not. i have a large data set. i am using nltk … |
|
there is function : int median(int a[], int b[]) { } how do i find the number of elements in a and b? i am doing sizeof(a)/sizeof(int) but it does not give right results. P.S. i need to submit the function only in online compiler so i dont know what … |
|
why this [code](http://ideone.com/hfYD8V) is giving me runtime error? |
|
what is static function in c++? when should a function is made static? |
|
i want to print a 'double' variable upto 8 decimal places without trailing zeroes. for eg: if a= **10.1234** then print **10.1234** if a= **10.00** then print **10** if a= **10.11111111111** then print **10.11111111** (max of 8 decimal places). how to do it? i searched for it and found this: … |
|
why it doesnot works for values other than 0 and -1 i mean when i tried to print values of array 'a' after memset() then it shows incorrect values. int a[100]; memset(a,0,sizeof(a)); ///it works memset(a,-1,sizeof(a)); ///it works memset(a,1,sizeof(a)); ///it doesnt |
|
what is the use of string.xml file in android? is it like defining global strings if we have multiple .java files in android application? correct me if i am wrong |
|
what is lvalue and rvalue? please explain with simple example. |
|
Re:
I am attempting to reverse a string for a homework assignment and then reverse each word in the string. The trick is we are suppose to code it without using functions. Like "I like cats" should be 1st "stac ekil I" and then "cats like I". Here is what I … |
|
Since in XOR linked list current pointer store the XOR of addresses of previous and next node. my question is how do we XOR two pointers? |
|
where is union required? please explain with an example where having union is a better choice than any data structure. |
|
int i=512; char *c=(char *)&i; c[0]=2; printf("%d",i); o/p is 514 |
|
Re:
Using C-Programming nested for() loops, write a program that displays all possible combinations of a 6 bit binary number. **Sample Run: 000000, 000001, 000010, 000011, ...........111110, 111111** Can anybody please help me in solving this question? |
|
|
Re:
we are getting i/p of 5,00,000 numbers ranging from 0 to 10^9 one by one. all numbers appears twice except one. We have to tell that number in the most efficient way. Any idea or just a hint to get this ? no code, no algo nothing i want. i … |
struct abcd { char q; int w; //long int e; }; why size of this structure is 8 bytes and if i include **long int e** , size becomes 12 bytes? |
|
public class QueueImpl<E extends Comparable<E>> { private int count; private class Node { private E info; Node next; } Node front; Node rear; public E peekMaximum() { Node temp = new Node(); temp = front; Node max = new Node(); max = temp; while(temp!=null) { System.out.println(temp.info); //if(temp.info>max) if((temp).compareTo(max))>0) // getting … |
|
int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); |
|
are these declaration same? const char *const s; char const *const s; |
|
i am using strrev function and also included the header file string.h but i am getting the compile error **‘strrev’ was not declared in this scope**. what else is required? |
|
#include<iostream> #include<math.h> using namespace std; int main() { long int t,n; cin>>t; while(t--) { cout<<"abc"; } return 0; } i am getting run time error for t>10000. how to solve it. range of t>1000000 |
|
i have made a queue using STL. the queue contains strings only. how to check for a particular string if it present in queue or not? |
|
struct node { int info; node *left,*right; }; int main() { struct node *root; root = (struct node*)malloc(sizeof(struct node)); root->info=NULL; root->left=NULL; root->right=NULL; if(root==NULL) printf("%d",root->info); return 0; } why it doesnt print root->info? |
|
#include<iostream> #include<conio.h> using namespace std; struct node { int info; node *left,*right; }; int main() { struct node *root; root=NULL; //root->info=NULL; //root = (struct node*)malloc(sizeof(struct node)); if(root==NULL) //cout<<root->info; cout<<root->info<< " "<<root->left<<" "<<root->right<<"\n"; getch(); return 0; } why it is giving an error? |
|
int a=-3,b=2,c=0,d; d=++a&&++b||++c; printf("a=%d,b=%d,c=%d,d=%d",a,b,c,d); why value of 'c' is not incremented in output? |
|
char str[]="S\065AB"; printf("\n%d", sizeof(str)); explain the output. i am getting 5. |
|
what is difference between a)strcpy and memcpy b) memcpy and memmov? |
|
Why the program is running without line 14? #include<stdio.h> #include<iostream> //#include<conio.h> //#include<math.h> #define FOR(i,a,b) for(int i=a;i<b;i++) using namespace std; int main() { int a[]={1,2,3,4,5,6,7,8,9,10}; int *b; //b=(int *) malloc(sizeof(a)); b=a; //cout<<b; FOR(i,0,10) cout<<b[i]<<" "; //cout<<sizeof(b); //getch(); return 0; } |
|
i am new to android application development. i have run hello world program only. now i want to run some sample code. when i try to run them i got this error in new dialog box: "Could not write file: C:\Program Files (x86)\Android\android-sdk\samples\android-15\SoftKeyboard\.project. C:\Program Files (x86)\Android\android-sdk\samples\android-15\SoftKeyboard\.project (Access is denied)" i … |
|
Re:
[CODE]#include <stdio.h> #include <stdlib.h> int add(int i, int j , int k) { while ( i != 0) { j = i % 10; k = k * j; i = i / 10; } return k; } int main () { int num, num2=1, r; int ret=1; int i=0; … |