-
Replied To a Post in Addition without arithmetic operators
@rubberman, you told me about vijayan121 code. I want to discuss about the code which I posted in the beginning only. That is fine which you told me for Vijayan's … -
Replied To a Post in Addition without arithmetic operators
@rubberman, so what's the problem with my code? How can I correct my code? I got whatever you said in the post. Can you mark the points where my program … -
Created Addition without arithmetic operators
#include<iostream> using namespace std; int add(int x,int y) { int ans=0; int carry=0; for(int i=0;i<=31;i++) { int p = (1<<i)&x; int q = (1<<i)&y; int r = p ^ q; … -
Began Watching Addition without arithmetic operators
#include<iostream> using namespace std; int add(int x,int y) { int ans=0; int carry=0; for(int i=0;i<=31;i++) { int p = (1<<i)&x; int q = (1<<i)&y; int r = p ^ q; … -
Edited Size of 2-D using pointer
I have come across one question: find the size of two 2-D arrays when double pointers are given for them.Then find, if we can muliply these two matrices(those mathematics rules). … -
Edited Size of 2-D using pointer
I have come across one question: find the size of two 2-D arrays when double pointers are given for them.Then find, if we can muliply these two matrices(those mathematics rules). … -
Created Size of 2-D using pointer
I have come across one question: find the size of two 2-D arrays when double pointers are given for them.Then find, if we can muliply these two matrices(those mathematics rules). … -
Began Watching Size of 2-D using pointer
I have come across one question: find the size of two 2-D arrays when double pointers are given for them.Then find, if we can muliply these two matrices(those mathematics rules). … -
Created virtual consructors and destructors
Why can we virtual destructors but can't have virtual constructors? I have searched like anything. I got confused a lot after reading few articles on web. Please explain with some … -
Began Watching virtual consructors and destructors
Why can we virtual destructors but can't have virtual constructors? I have searched like anything. I got confused a lot after reading few articles on web. Please explain with some … -
Created What is a spec file and a config file?
I am working on a project and I need one CmakeList.txt file, Config file, spec file. I searched a lot. tutorials are telling how to make these files and all. … -
Began Watching What is a spec file and a config file?
I am working on a project and I need one CmakeList.txt file, Config file, spec file. I searched a lot. tutorials are telling how to make these files and all. … -
Replied To a Post in Difference between thread-safe and reentrant?
SO, accessing non-constant global variables makes the function non-rentrant? Can I say that? If yes, then in your second example, it is accessing a variable which is global but non-const. … -
Replied To a Post in Which DS I should use?
@rubberman, :p I am not a school guy now. :) I thought of hashmaps. I don't know how to use them in this case as I want O(1), so hashmap … -
Created Which DS I should use?
This problem is troubling me from so long time. There are N scientists, K black holes, and any scientist can query about radius, size and temperature of any blackhole. You … -
Began Watching Which DS I should use?
This problem is troubling me from so long time. There are N scientists, K black holes, and any scientist can query about radius, size and temperature of any blackhole. You … -
Replied To a Post in Difference between thread-safe and reentrant?
@mike Thanks for such a great answer. But, I want to ask one question in "thread-safe but not reentrant" example , that when it is not giving me correct behaviour … -
Replied To a Post in which one is faster?
BAsically, I was asked to decrease the complexity of the first code from O(n). Then I wrote second. Then he told me decrease it further from O(n/2).Then, I wrote third … -
Edited which one is faster?
int find(int x) { for(int i=0;i < n; i++) { if(a[i]==x) return i; } return -1; } int find(int x) { for(int i=0;i < n/2; i+=2) { if(a[i]==x) return i; … -
Created which one is faster?
int find(int x) { for(int i=0;i < n; i++) { if(a[i]==x) return i; } return -1; } int find(int x) { for(int i=0;i < n/2; i+=2) { if(a[i]==x) return i; … -
Began Watching which one is faster?
int find(int x) { for(int i=0;i < n; i++) { if(a[i]==x) return i; } return -1; } int find(int x) { for(int i=0;i < n/2; i+=2) { if(a[i]==x) return i; … -
Replied To a Post in Difference between thread-safe and reentrant?
@Mike, Thanks for this great answer. Really. Can you please give one example to tell that it is thread-safe but not reentrant, which is not thread-safe but reentrant? I am … -
Created Difference between thread-safe and reentrant?
I am damn confused between these two terms. Can anyone explain this using some example? Thanks in advance. -
Began Watching Difference between thread-safe and reentrant?
I am damn confused between these two terms. Can anyone explain this using some example? Thanks in advance. -
Replied To a Post in Operating system concept problem
@Maritimo I think you are wrong in your explanation when you are making my statement corerct. I think statement written by me was correct. How comes 4Gb thing? Please explain. -
Created Operating system concept problem
**With a 2^32 address space and 4K ( 2^12 ) page sizes, this leave 2^20 entries in the page table. At 4 bytes per entry, this amounts to a 4 … -
Began Watching Operating system concept problem
**With a 2^32 address space and 4K ( 2^12 ) page sizes, this leave 2^20 entries in the page table. At 4 bytes per entry, this amounts to a 4 … -
Created Can I override the static functions?
I am very confused with static functions. Can I override them? If no, then why? I searched web a lot but i am still not clear. Please tell with one … -
Began Watching Can I override the static functions?
I am very confused with static functions. Can I override them? If no, then why? I searched web a lot but i am still not clear. Please tell with one … -
Created Difference between Data Hiding, Abstraction & Encapsulation?
Please tell me the difference between these three. I know the basic meaning but don't know exact meaning of all of them. Please explain a very good example if possible. … -
Began Watching Difference between Data Hiding, Abstraction & Encapsulation?
Please tell me the difference between these three. I know the basic meaning but don't know exact meaning of all of them. Please explain a very good example if possible. … -
Replied To a Post in What are some android apps I can make?
Yeah. That is true. But I want some small apps which use all these things and I have told you that I have read about all these things and developed … -
Edited What are some android apps I can make?
I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which … -
Edited What are some android apps I can make?
I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which … -
Created What are some android apps I can make?
I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which … -
Began Watching What are some android apps I can make?
I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which … -
Replied To a Post in what is a API in c++
@mike, now Can I say that a library is an API? Basically, API is a set of functions/classes which you showcase to users for their use. Library includes many headers … -
Began Watching what is a API in c++
I have been asked to design an API that allows the user to do this and do that in c++.. What exactly is an API. In c++ is an API … -
Replied To a Post in what is a API in c++
@mike Hats off to you. Great answer. One , the length of your answer, secondly your way of explanation. +1. :) -
Marked Solved Status for Split function confusion
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Test{ public static void main(String args[]){ String Str = new String("WelcometoTutorialspoint.com-"); int i=0; System.out.println("Return … -
Replied To a Post in Split function confusion
Yup. Thanks. It helped. :) Love you Daniweb. -
Replied To a Post in Split function confusion
Thanks. But, can you explain it with my example. It is my first code in Java. I dnt have much idea about Java. -
Created Split function confusion
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Test{ public static void main(String args[]){ String Str = new String("WelcometoTutorialspoint.com-"); int i=0; System.out.println("Return … -
Began Watching Split function confusion
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Test{ public static void main(String args[]){ String Str = new String("WelcometoTutorialspoint.com-"); int i=0; System.out.println("Return … -
Created How can I read this json String using Json-Glib?
**{"title":"iamtitle","icon":"","urlHistory":["http://google.com"],"lastUsed":123}** I have tried in c++ and using json-glib. I have tried using this: g_type_init(); JsonParser *parser = json_parser_new(); json_parser_load_from_data(parser, temp.c_str(), -1, NULL); JsonReader *reader = json_reader_new(json_parser_get_root(parser)); json_reader_read_member(reader,"urlHistory"); JsonNode * … -
Began Watching How can I read this json String using Json-Glib?
**{"title":"iamtitle","icon":"","urlHistory":["http://google.com"],"lastUsed":123}** I have tried in c++ and using json-glib. I have tried using this: g_type_init(); JsonParser *parser = json_parser_new(); json_parser_load_from_data(parser, temp.c_str(), -1, NULL); JsonReader *reader = json_reader_new(json_parser_get_root(parser)); json_reader_read_member(reader,"urlHistory"); JsonNode * … -
Replied To a Post in Difference between Java and c++
@mike. Thanks mike. but please tell me this thing that I have one string say : "nitinkdjdhdgshs/djjkdkd" mark that slash in it. Now when I add it into json string … -
Edited Difference between Java and c++
Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? … -
Edited Difference between Java and c++
Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? … -
Created Difference between Java and c++
Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? …
The End.