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?
Attachments:
Answers
Answered by
1
Answer:
I think 1st one but not sure
Answered by
0
Answer:
3 Rd one answer
Explanation:
3rd one answer
Similar questions