Answer to Question #242560 in Java | JSP | JSF for Aadu

Question #242560

Course Server


QUESTION


Test Cases & Qu


#include


int main


chat


scan


pris


ret


10


11


13 "1


14


15


16


17


18


19


20


21


22


23


// Warn


#includ


The current selected programming language is C. We emphasize the submission of a fully working code over partially correct but efficient code. Once submitted, you cannot review this problem again. You can use printf() to debug your code. The printf may not work in case of syntax/runtime error. The version of GCC being used is 5.5.0. The media company "GlobalAd" has received a batch of advertisements from different product brands. The batch of advertisements is a numeric value where each digit represents the number of advertisements the media company has received from different product brands. Since the company banners permit only even numbers of advertisements to be displayed, the media company needs to know the total number of advertisements it will be able to display from the given batch.


int


1
Expert's answer
2021-09-26T18:51:07-0400
#include<stdio.h>
#include<string.h> 
void print(char s[]) { 
int ln = strlen(s);  
char temp[ln]; 
for (int i = 0; i < ln; i++) { 
    int j = i; 
    int k = 0; 
    while (s[j] != '\0') { 
        temp[k] = s[j]; k++; j++; 
        
    }  
    j = 0; 
    while (j < i) { 
        temp[k] = s[j]; 
        j++; 
        k++;
    }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Shanmuga
08.01.22, 07:46

Ok

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS