Write a program to compare two strings without using the
strcmp() function
Answers were Sorted based on User's Feedback
Answer / sriramaraju
#include<stdio.h>
main()
{
//please read two strings int str1 and str2//
while(str1[i]!='/0' &&str2[i]!='/0')
if(str1[i]!=str2[i])
flag=1;
if(flag==1)
printf("equal");
}
| Is This Answer Correct ? | 127 Yes | 216 No |
two variables are added answer is stored on not for third variable how it is possible?
what is computer engg
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV
a<<1 is equivalent to a) multiplying by 2 b) dividing by 2 c) adding 2 d)none of the above
What is meant by global static? why we have to use static variable instead of Global variable
write a program in c language to print your bio-data on the screen by using functions.
6 Answers College School Exams Tests, IBM,
Can a local variable be volatile in c?
what is the program to display your name in any color?
#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }
Here is a neat trick for checking whether two strings are equal
Explain about the functions strcat() and strcmp()?