what is the different between if-else and switch statment
(other than syntax)
Answer Posted / sherin
There are some things that you simply cannot do with a
switch. These are:
A float expression cannot be tested using a switch
Cases can never have variable expressions (for example it is
wrong to say case a +3 : )
Multiple cases cannot use same expressions.
Is This Answer Correct ? | 17 Yes | 7 No |
Post New Answer View All Answers
What’s a signal? Explain what do I use signals for?
Is c language still used?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Write a program to reverse a given number in c language?
Explain how can type-insensitive macros be created?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
What is static function in c?
Can you write a programmer for FACTORIAL using recursion?
Differentiate between ordinary variable and pointer in c.
How does #define work?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
Is there any data type in c with variable size?
Who is the main contributor in designing the c language after dennis ritchie?
Calculate 1*2*3*____*n using recursive function??