void func(char*str)
Stack S;
int i;
for(i=0;i<strlen(str); i++)
if(str[i]=='(')
push(S,'(');
else if(str[i]==')' && !isEmpty(5))
pop(S);
else
printf("Unbalanced");
}
printf("Balanced");
Output?
Answers
Answered by
3
Explanation:
Balanced" (and any subsequent words) was ignored because we limit queries to 32 words
Similar questions
Math,
16 days ago
Computer Science,
16 days ago
Math,
16 days ago
Environmental Sciences,
1 month ago
Physics,
1 month ago
Math,
8 months ago
Math,
8 months ago
Physics,
8 months ago