Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~4K People Reached
Member Avatar for Esmerelda

One of the questions given to us for the lab exam was to generate the first 10 armstrong numbers. I could generate upto 5 numbers correctly..the rest are wrong. [code] #include<stdio.h> #include<conio.h> void main() { int n=1,a,b,i=1,r; clrscr(); while(i<=10) { a=0; b=n; do { r=b%10; a=a+r*r*r; b=b/10; }while(b>0); if(a==n) { …

Member Avatar for Tushar_4
0
2K
Member Avatar for Esmerelda

In the recursion tree method of solving recurrence equations.. why do we try to find an upper bound on the number of leaves (or the total cost of the leaf nodes). In most of the recursion tree examples we usually find the level by level sum to infinity.. what's the …

Member Avatar for rubberman
0
83
Member Avatar for Esmerelda

I just want to know the exact difference between intialising and assigning a variable. Is it possible to initialise a variable multiple times in C prog or is it just initialise once n assign all the other time...can somebody help me out please.

Member Avatar for WaltP
0
92
Member Avatar for Esmerelda
Member Avatar for thines01
0
134
Member Avatar for Esmerelda

[code] #include<stdio.h> main() { int a=1; switch(a) { case isdigit('1'):printf("Hello"); } }[/code] This code works fine Hello is printed [code] #include<stdio.h> main() { int a=1; switch(a) { case isalpha('a'):printf("Hello"); } }[/code] But this code gives an error It says case label does not reduce to an integer

Member Avatar for WaltP
0
123
Member Avatar for Esmerelda
Member Avatar for Esmerelda

I got this question in a competitive exam i wrote today...n i was just curious if my answer was right. The Question is : Let G be a complete undirected graph on 6 vertices. If vertices of G are labelled, then the number of distinct cycles of length 4 in …

Member Avatar for nupu123
0
162
Member Avatar for Esmerelda

Is this proof right?? Claim: Let #0(w) and #1(w) be the number of 0s and 1s in w, respectively. Then A = {uv ∈ {0, 1}∗ : |u| = |v|, #0(u) = #1(v), and #0(v) = #1(u)} is not a regular language. Proof : Say there is some pumping length …

Member Avatar for Esmerelda
0
86
Member Avatar for Esmerelda
Member Avatar for jbennet
0
97
Member Avatar for Esmerelda

The following snippet finds the least, greatest and sum of the elements of an array. It works when I give the test condition with variable "i" in the for loop (as in the first snippet). But when I replace it with a pointer(as in second snippet), it gives a wrong …

Member Avatar for Esmerelda
0
129
Member Avatar for varun gajjala

hii... im new to this web community.At present im working with Infosys on DOTNET platform.....I hope i will get benefit out of this n not only that please post me some interesting questions so that i can find solutions to those n brush up my skills..thnx a lot for this …

Member Avatar for Esmerelda
0
70