diff --git a/C/exam/answer.c b/C/exam/answer.c index e69de29..bc85622 100644 --- a/C/exam/answer.c +++ b/C/exam/answer.c @@ -0,0 +1,32 @@ +/* +Name: Adithya A +Roll No: 03 +Class : CS2B +*/ +//Input any string from the user and find the first occurrence of a given character in the string. +#include +#include +int first_occurance(char str[1000],char c){ + int i = 0; + for(i=0;i